|
Cataclysm BN
|
#include <game.h>
Classes | |
| class | Creature_range |
| class | debug_hour_timer |
| class | draw_callback_t |
| class | monster_range |
| class | non_dead_range |
| class | npc_range |
Public Member Functions | |
| game () | |
| ~game () | |
| void | load_static_data () |
| Loads static data that does not depend on mods or similar. More... | |
| void | load_core_data (loading_ui &ui) |
| Loads core dynamic data. More... | |
| bool | is_core_data_loaded () const |
| Returns whether the core data is currently loaded. More... | |
| bool | check_mod_data (const std::vector< mod_id > &opts, loading_ui &ui) |
| Check if mods can be successfully loaded. More... | |
| void | load_world_modfiles (loading_ui &ui) |
| Loads core data and mods from the active world. More... | |
| std::string | get_player_base_save_path () const |
| Base path for saving player data. More... | |
| std::string | get_world_base_save_path () const |
| Base path for saving world data. More... | |
| bool | load_packs (const std::string &msg, const std::vector< mod_id > &packs, loading_ui &ui) |
| Load content packs. More... | |
| void | on_options_changed () |
| Should be invoked whenever options change. More... | |
| void | setup () |
| void | serialize (std::ostream &fout) |
| Saving and loading functions. More... | |
| void | unserialize (std::istream &fin) |
| void | unserialize_master (std::istream &fin) |
| bool | dump_stats (const std::string &what, dump_mode mode, const std::vector< std::string > &opts) |
| write statistics to stdout and More... | |
| bool | save () |
| Returns false if saving failed. More... | |
| std::vector< std::string > | list_active_characters () |
| Returns a list of currently active character saves. More... | |
| void | write_memorial_file (const std::string &filename, std::string sLastWords) |
| Writes information about the character out to a text file timestamped with the time of the file was made. More... | |
| bool | cleanup_at_end () |
| void | start_calendar () |
| bool | do_turn () |
| MAIN GAME LOOP. More... | |
| shared_ptr_fast< ui_adaptor > | create_or_get_main_ui_adaptor () |
| void | invalidate_main_ui_adaptor () const |
| void | mark_main_ui_adaptor_resize () const |
| void | draw () |
| void | draw_ter (bool draw_sounds=true) |
| void | draw_ter (const tripoint ¢er, bool looking=false, bool draw_sounds=true) |
| void | add_draw_callback (shared_ptr_fast< draw_callback_t > cb) |
| void | draw_panels (bool force_draw=false) |
| cata::optional< tripoint > | get_veh_dir_indicator_location (bool next) const |
| Returns the location where the indicator should go relative to the reality bubble, or nothing to indicate no indicator should be drawn. More... | |
| void | draw_veh_dir_indicator (bool next) |
| void | vertical_move (int z, bool force, bool peeking=false) |
| Moves the player vertically. More... | |
| void | start_hauling (const tripoint &pos) |
| cata::optional< tripoint > | find_or_make_stairs (map &mp, int z_after, bool &rope_ladder, bool peeking) |
| Returns the other end of the stairs (if any). More... | |
| void | vertical_shift (int z_after) |
| Actual z-level movement part of vertical_move. More... | |
| void | vertical_notes (int z_before, int z_after) |
| Add goes up/down auto_notes (if turned on) More... | |
| void | use_computer (const tripoint &p) |
| Checks to see if a player can use a computer (not illiterate, etc.) and uses if able. More... | |
| template<typename T = Creature> | |
| T * | critter_by_id (const character_id &id) |
| template<typename T = Creature> | |
| T * | critter_at (const tripoint &p, bool allow_hallucination=false) |
| Returns the Creature at the given location. More... | |
| template<typename T = Creature> | |
| const T * | critter_at (const tripoint &p, bool allow_hallucination=false) const |
| template<typename T = Creature> | |
| shared_ptr_fast< T > | shared_from (const T &critter) |
| Returns a shared pointer to the given critter (which can be of any of the subclasses of Creature). More... | |
| size_t | num_creatures () const |
| Returns the approximate number of creatures in the reality bubble. More... | |
| bool | update_zombie_pos (const monster &critter, const tripoint &pos) |
| Redirects to the creature_tracker update_pos() function. More... | |
| void | remove_zombie (const monster &critter) |
| void | clear_zombies () |
| Redirects to the creature_tracker clear() function. More... | |
| bool | spawn_hallucination (const tripoint &p) |
| Spawns a hallucination at a determined position. More... | |
| bool | swap_critters (Creature &, Creature &) |
| Swaps positions of two creatures. More... | |
| Creature_range | all_creatures () |
| Returns an anonymous range that contains all creatures. More... | |
| monster_range | all_monsters () |
| Same as all_creatures but iterators only over monsters. More... | |
| npc_range | all_npcs () |
| Same as all_creatures but iterators only over npcs. More... | |
| std::vector< Creature * > | get_creatures_if (const std::function< bool(const Creature &)> &pred) |
| Returns all creatures matching a predicate. More... | |
| std::vector< npc * > | get_npcs_if (const std::function< bool(const npc &)> &pred) |
| Creature * | get_creature_if (const std::function< bool(const Creature &)> &pred) |
| Returns a creature matching a predicate. More... | |
| bool | is_empty (const tripoint &p) |
| Returns true if there is no player, NPC, or monster on the tile and move_cost > 0. More... | |
| bool | is_in_sunlight (const tripoint &p) |
| Returns true if p is outdoors and it is sunny. More... | |
| bool | is_sheltered (const tripoint &p) |
| Returns true if p is indoors, underground, or in a car. More... | |
| bool | revive_corpse (const tripoint &p, item &it) |
| Revives a corpse at given location. More... | |
| void | save_cyborg (item *cyborg, const tripoint &couch_pos, player &installer) |
| Turns Broken Cyborg monster into Cyborg NPC via surgery. More... | |
| bool | cancel_activity_query (const std::string &text) |
| Asks if the player wants to cancel their activity, and if so cancels it. More... | |
| bool | cancel_activity_or_ignore_query (distraction_type type, const std::string &text) |
| Asks if the player wants to cancel their activity and if so cancels it. More... | |
| void | moving_vehicle_dismount (const tripoint &dest_loc) |
| Handles players exiting from moving vehicles. More... | |
| vehicle * | remoteveh () |
| Returns the current remotely controlled vehicle. More... | |
| void | setremoteveh (vehicle *veh) |
| Sets the current remotely controlled vehicle. More... | |
| int | assign_mission_id () |
| Returns the next available mission id. More... | |
| npc * | find_npc (character_id id) |
| Find the npc with the given ID. More... | |
| void | load_npcs () |
| Makes any nearby NPCs on the overmap active. More... | |
| void | reload_npcs () |
| Unloads, then loads the NPCs. More... | |
| const kill_tracker & | get_kill_tracker () const |
| void | add_npc_follower (const character_id &id) |
| Add follower id to set of followers. More... | |
| void | remove_npc_follower (const character_id &id) |
| Remove follower id from follower set. More... | |
| std::set< character_id > | get_follower_list () |
| Get set of followers. More... | |
| void | validate_npc_followers () |
| validate list of followers to account for overmap buffers More... | |
| void | validate_mounted_npcs () |
| void | validate_linked_vehicles () |
| validate towed vehicles so they get linked up again after a load More... | |
| void | validate_camps () |
| validate camps to ensure they are on the overmap list More... | |
| void | autopilot_vehicles () |
| process vehicles that are following the player More... | |
| void | catch_a_monster (monster *fish, const tripoint &pos, player *p, const time_duration &catch_duration) |
| Picks and spawns a random fish from the remaining fish list when a fish is caught. More... | |
| std::unordered_set< tripoint > | get_fishable_locations (int distance, const tripoint &fish_pos) |
| Get the contiguous fishable locations starting at fish_pos, out to the specificed distance. More... | |
| std::vector< monster * > | get_fishable_monsters (std::unordered_set< tripoint > &fishable_locations) |
| Get the fishable monsters within the provided fishable locations. More... | |
| void | fling_creature (Creature *c, const units::angle &dir, float flvel, bool controlled=false, bool suppress_map_update=false) |
| Flings the input creature in the given direction. More... | |
| float | natural_light_level (int zlev) const |
| unsigned char | light_level (int zlev) const |
| Returns coarse number-of-squares of visibility at the current light level. More... | |
| void | reset_light_level () |
| character_id | assign_npc_id () |
| Creature * | is_hostile_nearby () |
| Creature * | is_hostile_very_close () |
| point | update_map (player &p) |
| point | update_map (int &x, int &y) |
| void | update_overmap_seen () |
| void | process_artifact (item &it, player &p) |
| void | add_artifact_messages (const std::vector< art_effect_passive > &effects) |
| void | add_artifact_dreams () |
| void | peek () |
| void | peek (const tripoint &p) |
| cata::optional< tripoint > | look_debug () |
| bool | check_zone (const zone_type_id &type, const tripoint &where) const |
| bool | check_near_zone (const zone_type_id &type, const tripoint &where) const |
| Checks whether or not there is a zone of particular type nearby. More... | |
| bool | is_zones_manager_open () const |
| void | zones_manager () |
| cata::optional< tripoint > | look_around (bool force_3d=false) |
| look_around_result | look_around (bool show_window, tripoint ¢er, const tripoint &start_point, bool has_first_point, bool select_zone, bool peeking, bool is_moving_zone=false, const tripoint &end_point=tripoint_zero, bool force_3d=false) |
| void | pre_print_all_tile_info (const tripoint &lp, const catacurses::window &w_info, int &line, int last_line, const visibility_variables &cache) |
| void | print_all_tile_info (const tripoint &lp, const catacurses::window &w_look, const std::string &area_name, int column, int &line, int last_line, const visibility_variables &cache) |
| void | draw_look_around_cursor (const tripoint &lp, const visibility_variables &cache) |
| void | extended_description (const tripoint &p) |
| Long description of (visible) things at tile. More... | |
| void | draw_trail_to_square (const tripoint &t, bool bDrawX) |
| item_location | inv_map_splice (item_filter filter, const std::string &title, int radius=0, const std::string &none_message="") |
| Custom-filtered menu for inventory and nearby items and those that within specified radius. More... | |
| bool | has_gametype () const |
| special_game_id | gametype () const |
| void | toggle_fullscreen () |
| void | toggle_pixel_minimap () |
| void | reload_tileset () |
| void | temp_exit_fullscreen () |
| void | reenter_fullscreen () |
| void | zoom_in () |
| void | zoom_out () |
| void | reset_zoom () |
| void | set_zoom (int level) |
| int | get_zoom () const |
| int | get_moves_since_last_save () const |
| int | get_user_action_counter () const |
| bool | take_screenshot (const std::string &file_path) const |
| Saves a screenshot of the current viewport, as a PNG file, to the given location. More... | |
| bool | take_screenshot () const |
| Saves a screenshot of the current viewport, as a PNG file. More... | |
| int | get_levx () const |
| The top left corner of the reality bubble (in submaps coordinates). More... | |
| int | get_levy () const |
| int | get_levz () const |
| void | load_map (const tripoint &pos_sm, bool pump_events=false) |
| Load the main map at given location, see map::load, in global, absolute submap coordinates. More... | |
| void | load_map (const tripoint_abs_sm &pos_sm, bool pump_events=false) |
| overmap & | get_cur_om () const |
| The overmap which contains the center submap of the reality bubble. More... | |
| std::vector< npc * > | allies () |
| Get all living player allies. More... | |
| void | set_driving_view_offset (const point &p) |
| void | calc_driving_offset (vehicle *veh=nullptr) |
| void | toggle_gate (const tripoint &p) |
| void | knockback (const tripoint &s, const tripoint &t, int force, int stun, int dam_mult, Creature *source) |
| void | knockback (std::vector< tripoint > &traj, int stun, int dam_mult, Creature *source) |
| void | draw_bullet (const tripoint &t, int i, const std::vector< tripoint > &trajectory, char bullet) |
| void | draw_hit_mon (const tripoint &p, const monster &m, bool dead=false) |
| void | draw_hit_player (const Character &p, int dam) |
| void | draw_line (const tripoint &p, const tripoint ¢er_point, const std::vector< tripoint > &points, bool noreveal=false) |
| void | draw_line (const tripoint &p, const std::vector< tripoint > &points) |
| void | draw_weather (const weather_printable &wPrint) |
| void | draw_sct () |
| void | draw_zones (const tripoint &start, const tripoint &end, const tripoint &offset) |
| void | draw_critter (const Creature &critter, const tripoint ¢er) |
| void | draw_critter_highlighted (const Creature &critter, const tripoint ¢er) |
| void | draw_cursor (const tripoint &p) |
| void | draw_highlight (const tripoint &p) |
| void | draw_radiation_override (const tripoint &p, int rad) |
| void | draw_terrain_override (const tripoint &p, const ter_id &id) |
| void | draw_furniture_override (const tripoint &p, const furn_id &id) |
| void | draw_graffiti_override (const tripoint &p, bool has) |
| void | draw_trap_override (const tripoint &p, const trap_id &id) |
| void | draw_field_override (const tripoint &p, const field_type_id &id) |
| void | draw_item_override (const tripoint &p, const itype_id &id, const mtype_id &mid, bool hilite) |
| void | draw_vpart_override (const tripoint &p, const vpart_id &id, int part_mod, units::angle veh_dir, bool hilite, const point &mount) |
| void | draw_below_override (const tripoint &p, bool draw) |
| void | draw_monster_override (const tripoint &p, const mtype_id &id, int count, bool more, Creature::Attitude att) |
| bool | is_in_viewport (const tripoint &p, int margin=0) const |
| bool | check_safe_mode_allowed (bool repeat_safe_mode_warnings=true) |
| Check whether movement is allowed according to safe mode settings. More... | |
| void | set_safe_mode (safe_mode_type mode) |
| void | exam_vehicle (vehicle &veh, const point &cp=point_zero) |
| open vehicle interaction screen More... | |
| bool | forced_door_closing (const tripoint &p, const ter_id &door_type, int bash_dmg) |
| bool | load (const std::string &world) |
| Attempt to load first valid save (if any) in world. More... | |
| bool | npc_menu (npc &who) |
| Returns true if the menu handled stuff and player shouldn't do anything else. More... | |
| bool | phasing_move (const tripoint &dest, bool via_ramp=false) |
| bool | walk_move (const tripoint &dest, bool via_ramp=false) |
| void | on_move_effects () |
| point | place_player (const tripoint &dest) |
| void | place_player_overmap (const tripoint_abs_omt &om_dest) |
| unsigned int | get_seed () const |
| void | set_npcs_dirty () |
| If invoked, NPCs will be reloaded before next turn. More... | |
| void | set_critter_died () |
| If invoked, dead will be cleaned this turn. More... | |
| void | mon_info (const catacurses::window &, int hor_padding=0) |
| void | mon_info_update () |
| void | cleanup_dead () |
| bool | is_dangerous_tile (const tripoint &dest_loc) const |
| std::vector< std::string > | get_dangerous_tile (const tripoint &dest_loc) const |
| bool | prompt_dangerous_tile (const tripoint &dest_loc) const |
| void | despawn_monster (monster &critter) |
| Despawn a specific monster, it's stored on the overmap. More... | |
| void | win () |
| Marks the game as won. More... | |
| bool | disable_robot (const tripoint &p) |
| If there is a robot (that can be disabled), query the player and try to disable it. More... | |
| void | draw_pixel_minimap (const catacurses::window &w) |
| void | quicksave () |
| void | disp_NPCs () |
| void | list_missions () |
| event_bus & | events () |
| stats_tracker & | stats () |
| memorial_logger & | memorial () |
| spell_events & | spell_events_subscriber () |
| void | display_toggle_overlay (action_id) |
| bool | display_overlay_state (action_id) |
| void | toggle_debug_hour_timer () |
| tripoint | mouse_edge_scrolling_terrain (input_context &ctxt) |
| Used to implement mouse "edge scrolling". More... | |
| tripoint | mouse_edge_scrolling_overmap (input_context &ctxt) |
| This variant is suitable for the overmap. More... | |
| void | shift_destination_preview (const point &delta) |
| bool | slip_down () |
| Checks if player is able to successfully climb to/from some terrain and not slip down. More... | |
| monster * | place_critter_at (const mtype_id &id, const tripoint &p) |
| Adds critters to the reality bubble, creating them if necessary. More... | |
| monster * | place_critter_at (const shared_ptr_fast< monster > &mon, const tripoint &p) |
| monster * | place_critter_around (const mtype_id &id, const tripoint ¢er, int radius) |
| monster * | place_critter_around (const shared_ptr_fast< monster > &mon, const tripoint ¢er, int radius, bool forced=false) |
| monster * | place_critter_within (const mtype_id &id, const tripoint_range< tripoint > &range) |
| monster * | place_critter_within (const shared_ptr_fast< monster > &mon, const tripoint_range< tripoint > &range) |
Protected Member Functions | |
| void | load_data_from_dir (const std::string &path, const std::string &src, loading_ui &ui) |
| Loads dynamic data from the given directory. More... | |
Private Types | |
| enum class | vmenu_ret : int { CHANGE_TAB , QUIT , FIRE } |
Private Member Functions | |
| void | unload_npcs () |
| Unloads all NPCs. More... | |
| bool | load (const save_t &name) |
| void | load_master () |
| bool | start_game () |
| bool | save_factions_missions_npcs () |
| void | reset_npc_dispositions () |
| void | serialize_master (std::ostream &fout) |
| bool | save_artifacts () |
| bool | save_maps () |
| void | init_autosave () |
| void | create_starting_npcs () |
| vehicle * | place_vehicle_nearby (const vproto_id &id, const point_abs_omt &origin, int min_distance, int max_distance, const std::vector< std::string > &omt_search_types={}) |
| void | list_items_monsters () |
| game::vmenu_ret | list_items (const std::vector< map_item_stack > &item_list) |
| std::vector< map_item_stack > | find_nearby_items (int iRadius) |
| void | reset_item_list_state (const catacurses::window &window, int height, bool bRadiusSort) |
| game::vmenu_ret | list_monsters (const std::vector< Creature * > &monster_list) |
| bool | grabbed_move (const tripoint &dp) |
| Check for dangerous stuff at dest_loc, return false if the player decides not to step there. More... | |
| bool | grabbed_veh_move (const tripoint &dp) |
| bool | grabbed_furn_move (const tripoint &dp) |
| void | control_vehicle () |
| void | examine (const tripoint &p) |
| void | examine () |
| void | pickup () |
| void | pickup (const tripoint &p) |
| void | pickup_feet () |
| void | drop () |
| void | drop_in_direction () |
| void | butcher () |
| void | chat () |
| void | print_fields_info (const tripoint &lp, const catacurses::window &w_look, int column, int &line) |
| void | print_terrain_info (const tripoint &lp, const catacurses::window &w_look, const std::string &area_name, int column, int &line) |
| void | print_trap_info (const tripoint &lp, const catacurses::window &w_look, int column, int &line) |
| void | print_creature_info (const Creature *creature, const catacurses::window &w_look, int column, int &line, int last_line) |
| void | print_vehicle_info (const vehicle *veh, int veh_part, const catacurses::window &w_look, int column, int &line, int last_line) |
| void | print_visibility_info (const catacurses::window &w_look, int column, int &line, visibility_type visibility) |
| void | print_items_info (const tripoint &lp, const catacurses::window &w_look, int column, int &line, int last_line) |
| void | print_graffiti_info (const tripoint &lp, const catacurses::window &w_look, int column, int &line, int last_line) |
| input_context | get_player_input (std::string &action) |
| void | replace_stair_monsters () |
| void | update_stair_monsters () |
| void | shift_monsters (const tripoint &shift) |
| Shift all active monsters, the shift vector is the number of shifted submaps. More... | |
| void | perhaps_add_random_npc () |
| void | monmove () |
| void | overmap_npc_move () |
| void | process_voluntary_act_interrupt () |
| void | process_activity () |
| void | handle_key_blocking_activity () |
| void | open_consume_item_menu () |
| bool | handle_action () |
| bool | try_get_right_click_action (action_id &act, const tripoint &mouse_target) |
| bool | try_get_left_click_action (action_id &act, const tripoint &mouse_target) |
| void | item_action_menu () |
| bool | is_game_over () |
| void | death_screen () |
| void | win_screen () |
| void | draw_minimap () |
| void | autosave () |
| void | quickload () |
| bool | handle_mouseview (input_context &ctxt, std::string &action) |
| void | display_faction_epilogues () |
| void | disp_NPC_epilogues () |
| void | display_scent () |
| void | display_temperature () |
| void | display_vehicle_ai () |
| void | display_visibility () |
| void | display_lighting () |
| void | display_radiation () |
| void | display_transparency () |
| Creature * | is_hostile_within (int distance) |
| void | move_save_to_graveyard (const std::string &dirname) |
| bool | save_player_data () |
| std::pair< tripoint, tripoint > | mouse_edge_scrolling (input_context &ctxt, int speed, const tripoint &last, bool iso) |
Friends | |
| class | editmap |
| class | advanced_inventory |
| class | main_menu |
| class | monster_range |
| class | Creature_range |
| distribution_grid_tracker & | get_distribution_grid_tracker () |
| Returns distribution grid tracker that is a part of the global game *g. More... | |
| map & | get_map () |
| Character & | get_player_character () |
| avatar & | get_avatar () |
| weather_manager & | get_weather () |
|
strongprivate |
| game::game | ( | ) |
Definition at line 293 of file game.cpp.
References achievements_tracker_ptr, events(), first_redraw_since_waiting_started, kill_tracker_ptr, memorial_logger_ptr, reset_light_level(), spell_events_ptr, stats_tracker_ptr, event_bus::subscribe(), and world_generator.
|
default |
| void game::add_artifact_dreams | ( | ) |
Definition at line 11958 of file game.cpp.
References _, ACR_NULL, add_msg(), check_art_charge_req(), g, m_debug, random_entry(), rng(), string_format(), and x_in_y().
Referenced by do_turn().
| void game::add_artifact_messages | ( | const std::vector< art_effect_passive > & | effects | ) |
Definition at line 11780 of file game.cpp.
References _, add_msg(), AEP_ALL_DOWN, AEP_ALL_UP, AEP_ATTENTION, AEP_BAD_WEATHER, AEP_CARRY_MORE, AEP_CLAIRVOYANCE, AEP_CLAIRVOYANCE_PLUS, AEP_DEX_DOWN, AEP_DEX_UP, AEP_EVIL, AEP_FORCE_TELEPORT, AEP_FUN, AEP_GLOW, AEP_HUNGER, AEP_INT_DOWN, AEP_INT_UP, AEP_INVISIBLE, AEP_MOVEMENT_NOISE, AEP_MUTAGENIC, AEP_PBLUE, AEP_PER_DOWN, AEP_PER_UP, AEP_PSYSHIELD, AEP_RADIOACTIVE, AEP_RESIST_ELECTRICITY, AEP_SCHIZO, AEP_SICK, AEP_SMOKE, AEP_SNAKES, AEP_SPEED_DOWN, AEP_SPEED_UP, AEP_STEALTH, AEP_STR_DOWN, AEP_STR_UP, AEP_SUPER_CLAIRVOYANCE, AEP_THIRST, m_bad, m_good, m_info, m_neutral, m_warning, and string_format().
| void game::add_draw_callback | ( | shared_ptr_fast< draw_callback_t > | cb | ) |
Definition at line 3174 of file game.cpp.
References draw_callbacks, and invalidate_main_ui_adaptor().
Referenced by get_player_input(), list_items(), list_monsters(), look_around(), pickup(), and zones_manager().
| void game::add_npc_follower | ( | const character_id & | id | ) |
Add follower id to set of followers.
Definition at line 1986 of file game.cpp.
References follower_ids, player::follower_ids, and u.
Referenced by validate_npc_followers().
| game::Creature_range game::all_creatures | ( | ) |
Returns an anonymous range that contains all creatures.
The range allows iteration via a range-based for loop, e.g. for( Creature &critter : all_creatures() ) { ... }. One shall not store the returned range nor the iterators. One can freely remove and add creatures to the game during the iteration. Added creatures will not be iterated over.
Definition at line 12114 of file game.cpp.
References Creature_range.
Referenced by draw_ter(), get_creature_if(), and get_creatures_if().
| game::monster_range game::all_monsters | ( | ) |
Same as all_creatures but iterators only over monsters.
Definition at line 12119 of file game.cpp.
References monster_range.
Referenced by cleanup_at_end(), disp_NPCs(), get_fishable_monsters(), monmove(), place_player_overmap(), shift_monsters(), start_game(), validate_mounted_npcs(), and vertical_move().
| game::npc_range game::all_npcs | ( | ) |
Same as all_creatures but iterators only over npcs.
Definition at line 12124 of file game.cpp.
Referenced by do_turn(), and get_npcs_if().
| std::vector< npc * > game::allies | ( | ) |
Get all living player allies.
Definition at line 12028 of file game.cpp.
References get_npcs_if(), and npc::is_hallucination().
| int game::assign_mission_id | ( | ) |
Returns the next available mission id.
Definition at line 1974 of file game.cpp.
References next_mission_id, and cata::hash64_detail::ret.
| character_id game::assign_npc_id | ( | ) |
Definition at line 3731 of file game.cpp.
References next_npc_id, and cata::hash64_detail::ret.
Referenced by load(), and start_game().
| void game::autopilot_vehicles | ( | ) |
process vehicles that are following the player
Definition at line 1773 of file game.cpp.
References vehicle::autopilot_patrol(), vehicle::drive_to_local_target(), map::get_vehicles(), map::getabs(), vehicle::is_following, vehicle::is_patrolling, m, Character::pos(), and u.
Referenced by do_turn().
|
private |
Definition at line 11447 of file game.cpp.
References last_save_timestamp, and quicksave().
Referenced by do_turn().
|
private |
Definition at line 8442 of file game.cpp.
References _, Character::activity, add_corpses(), add_disassemblables(), add_msg(), add_salvagables(), uilist::addentry(), uilist::addentry_col(), Character::assign_activity(), item_stack::begin(), butcher_submenu(), crafting::can_disassemble(), Character::controlling_vehicle, Character::crafting_inventory(), salvage_actor::cut_up(), debugmsg, crafting::disassemble(), crafting::disassemble_all(), Creature::disp_name(), item_stack::end(), time_duration::from_turns(), generate_butcher_stack_display(), use_function::get_actor_ptr(), player::get_crafting_helpers(), Character::get_item_position(), recipe_dictionary::get_uncraft(), item::get_usable_item(), item::get_use(), map::has_flag(), Character::has_morale_to_craft(), map::i_at(), is_hostile_very_close(), visitable< T >::items_with(), m, m_info, MAX_ITEM_IN_SQUARE, visitable< T >::max_quality(), Character::pos(), uilist::query(), query_yn(), cata::hash64_detail::ret, uilist::ret, map::sees_some_items(), item_stack::size(), player_activity::targets, uilist::text, recipe::time, salvage_actor::time_to_cut_up(), to_string_clipped(), u, and salvage_actor::valid_to_cut_up().
Referenced by handle_action().
| void game::calc_driving_offset | ( | vehicle * | veh = nullptr | ) |
Definition at line 1353 of file game.cpp.
References vehicle::cruise_velocity, driving_view_offset, units::fabs(), vehicle::face_vec(), catacurses::getmaxx(), catacurses::getmaxy(), light_level(), vehicle::move_vec(), vehicle::player_in_control(), point_zero, Character::posz(), set_driving_view_offset(), Character::sight_range(), vehicle::skidding, u, veh_lumi(), vehicle::velocity, vehicles::vmiph_per_tile, w_terrain, point::x, rl_vec2d::x, point::y, and rl_vec2d::y.
Referenced by do_turn().
| bool game::cancel_activity_or_ignore_query | ( | distraction_type | type, |
| const std::string & | text | ||
| ) |
Asks if the player wants to cancel their activity and if so cancels it.
Additionally checks if the player wants to ignore further distractions.
Definition at line 1812 of file game.cpp.
References action, query_popup::result::action, Character::activity, input_context::allow_all_keys, Character::backlog, Character::cancel_activity(), cancel_auto_move(), query_popup::context(), input_context::disallow_lower_case, Character::get_auto_move_route(), get_distraction_manager(), player_activity::get_stop_phrase(), Character::has_distant_destination(), player_activity::ignore_distraction(), invalidate_main_ui_adaptor(), player_activity::is_distraction_ignored(), query_popup::message(), query_popup::option(), pgettext(), query_popup::query(), ui_manager::redraw(), refresh_display(), Character::set_destination(), distraction_manager::distraction_manager_gui::show(), type, and u.
Referenced by mon_info_update(), monmove(), and process_voluntary_act_interrupt().
| bool game::cancel_activity_query | ( | const std::string & | text | ) |
Asks if the player wants to cancel their activity, and if so cancels it.
Definition at line 1867 of file game.cpp.
References Character::activity, Character::cancel_activity(), cancel_auto_move(), Character::clear_destination(), Character::get_auto_move_route(), player_activity::get_stop_phrase(), Character::has_distant_destination(), invalidate_main_ui_adaptor(), query_yn(), Character::resume_backlog_activity(), Character::set_destination(), and u.
Referenced by handle_key_blocking_activity().
| void game::catch_a_monster | ( | monster * | fish, |
| const tripoint & | pos, | ||
| player * | p, | ||
| const time_duration & | catch_duration | ||
| ) |
Picks and spawns a random fish from the remaining fish list when a fish is caught.
Definition at line 1785 of file game.cpp.
References _, map::add_item_or_charges(), player::add_msg_if_player(), monster::die(), mtype::id, m, m_good, item::make_corpse(), mtype::nname(), monster::no_corpse_quiet, rng(), Character::sees(), calendar::turn, monster::type, and u.
|
private |
Definition at line 394 of file npctalk.cpp.
References _, add_msg(), player::add_msg_if_player(), uilist::addentry(), talk_function::assign_guard(), assign_veh_to_follow(), available, Character::can_hear(), talk_function::clear_overrides(), npc::companion_mission_role_id, Character::disp_name(), effect_riding, talk_function::find_mount(), fuel_type_animal, get_npcs_if(), Character::get_shout_volume(), map::get_vehicles(), vpart_info::has_flag(), Character::has_trait(), npc::is_following(), npc::is_player_ally(), Character::is_wearing(), m, m_warning, mapgen_defer::message, npc::mission, Creature::moves, om_direction::name(), NPC_CHAT_ANIMAL_VEHICLE_FOLLOW, NPC_CHAT_ANIMAL_VEHICLE_STOP_FOLLOW, NPC_CHAT_AWAKE, NPC_CHAT_CLEAR_OVERRIDES, NPC_CHAT_COMMAND_MAGIC_VEHICLE_FOLLOW, NPC_CHAT_COMMAND_MAGIC_VEHICLE_STOP_FOLLOW, NPC_CHAT_DANGER, NPC_CHAT_DISMOUNT, NPC_CHAT_FOLLOW, NPC_CHAT_GUARD, NPC_CHAT_MOUNT, NPC_CHAT_ORDERS, NPC_CHAT_SENTENCE, NPC_CHAT_TALK, NPC_CHAT_YELL, NPC_MISSION_GUARD_ALLY, npc_select_menu(), npc_temp_orders_menu(), popup(), Character::pos(), Character::posz(), uilist::query(), uilist::ret, rl_dist(), Character::sees(), SEEX, Character::shout(), talk_function::stop_guard(), string_format(), tell_magic_veh_stop_following(), tell_magic_veh_to_follow(), tell_veh_stop_following(), uilist::text, trait_PROF_FOODP, u, and talk_function::wake_up().
Referenced by handle_action().
| bool game::check_mod_data | ( | const std::vector< mod_id > & | opts, |
| loading_ui & | ui | ||
| ) |
Check if mods can be successfully loaded.
| opts | check specific mods (or all if unspecified) |
Definition at line 353 of file game.cpp.
References detail::check(), overmapbuffer::clear(), DynamicDataLoader::finalize_loaded_data(), DynamicDataLoader::get_instance(), load_core_data(), load_data_from_dir(), MAPBUFFER, overmap_buffer, mapbuffer::reset(), and world_generator.
| bool game::check_near_zone | ( | const zone_type_id & | type, |
| const tripoint & | where | ||
| ) | const |
Checks whether or not there is a zone of particular type nearby.
Definition at line 6163 of file game.cpp.
References zone_manager::get_manager(), map::getabs(), zone_manager::has_near(), m, and type.
| bool game::check_safe_mode_allowed | ( | bool | repeat_safe_mode_warnings = true | ) |
Check whether movement is allowed according to safe mode settings.
Definition at line 8698 of file game.cpp.
References _, ACTION_IGNORE_ENEMY, ACTION_TOGGLE_SAFEMODE, ACTION_WHITELIST_ENEMY, add_msg(), Character::controlling_vehicle, effect_laserlocked, avatar::get_int_base(), avatar::get_mon_visible(), get_safemode(), gmf_bypass_cooldown, Creature::has_effect(), Character::has_trait(), safemode::lastmon_whitelist, m_warning, monster_visible_info::new_seen_mon, safemode::npc_type_name(), press_x(), safe_mode, SAFE_MODE_STOP, safe_mode_warning_logged, string_format(), u, utf8_to_wstr(), and wstr_to_utf8().
Referenced by handle_action().
| bool game::check_zone | ( | const zone_type_id & | type, |
| const tripoint & | where | ||
| ) | const |
Definition at line 6158 of file game.cpp.
References zone_manager::get_manager(), map::getabs(), zone_manager::has(), m, and type.
Referenced by place_player().
| bool game::cleanup_at_end | ( | ) |
Definition at line 1049 of file game.cpp.
References _, uilist::addentry(), all_monsters(), uilist::allow_cancel, sfx::any, c_brown, c_green, c_light_gray, c_magenta, c_red, c_white, center_print(), memorial_logger::clear(), overmapbuffer::clear(), sfx::context_themes, death_screen(), despawn_monster(), sfx::do_player_death_hurt(), draw_border(), events(), sfx::fade_audio_channel(), sfx::fade_audio_group(), sfx::fatigue, detail::find(), FULL_SCREEN_HEIGHT, FULL_SCREEN_WIDTH, g, game_over, gamemode, generate_memorial_filename(), get_kill_tracker(), visitable< T >::has_amount(), Character::has_trait(), itype_holybook_bible1, itype_holybook_bible2, itype_holybook_bible3, list_active_characters(), MAPBUFFER, string_input_popup::max_length(), memorial(), mk_wcwidth(), kill_tracker::monster_kill_count(), move_save_to_graveyard(), mvwprintz(), mvwputch(), Character::name, catacurses::newwin(), overmap_buffer, point_zero, popup(), uilist::query(), string_input_popup::query_string(), query_yn(), QUIT_DIED, QUIT_SUICIDE, mapbuffer::reset(), reset_npc_dispositions(), uilist::ret, save_artifacts(), save_factions_missions_npcs(), save_maps(), event_bus::send(), set_driving_view_offset(), om_direction::size, calendar::start_of_cataclysm, string_format(), TERMX, TERMY, sfx::time_of_day, calendar::turn, u, uquit, UTF8_getch(), utf8_width(), sfx::weather, string_input_popup::window(), world_generator, wprintz(), and write_memorial_file().
Referenced by do_turn().
| void game::cleanup_dead | ( | ) |
Definition at line 4193 of file game.cpp.
References active_npc, critter_died, critter_tracker, overmap_buffer, overmapbuffer::remove_npc(), and remove_npc_follower().
| void game::clear_zombies | ( | ) |
Redirects to the creature_tracker clear() function.
Definition at line 4869 of file game.cpp.
References critter_tracker.
Referenced by setup().
|
private |
Definition at line 5315 of file game.cpp.
References _, add_msg(), vehicle::autopilot_on, vehicle::avail_part_with_feature(), choose_adjacent(), avatar::clear_memorized_tile(), Character::controlling_vehicle, vehicle::engine_on, fuel_type_animal, g, vehicle::get_points(), map::getabs(), vehicle::handle_potential_theft(), vehicle::has_engine_type(), vehicle::has_harnessed_animal(), Character::has_trait(), Character::in_vehicle, vehicle::interact_vehicle_locked(), vehicle::is_autodriving, vehicle::is_following, vehicle::is_patrolling, m, m_info, vehicle::name, vpart_position::part_with_feature(), vehicle::player_in_control(), map::points_in_radius(), Character::pos(), remoteveh(), vehicle::start_engines(), trait_WAYFARER, u, vehicle::use_controls(), cata::optional< T >::value(), map::veh_at(), and vehicle::vehicle().
Referenced by handle_action().
| shared_ptr_fast< ui_adaptor > game::create_or_get_main_ui_adaptor | ( | ) |
In tiles mode w_terrain can have a different font (with a different tile dimension) or can be drawn by cata_tiles which uses tiles that again might have a different dimension then the normal font used everywhere else.
TERRAIN_WINDOW_WIDTH/TERRAIN_WINDOW_HEIGHT defines how many squares can be displayed in w_terrain (using it's specific tile dimension), not including partially drawn squares at the right/bottom. You should use it whenever you want to draw specific squares in that window or to determine whether a specific square is draw on screen (or outside the screen and needs scrolling).
TERRAIN_WINDOW_TERM_WIDTH/TERRAIN_WINDOW_TERM_HEIGHT defines the size of w_terrain in the standard font dimension (the font that everything else uses). You usually don't have to use it, expect for positioning of windows, because the window positions use the standard font dimension.
The code here calculates size available for w_terrain, caps it at max_view_size (the maximal view range than any character can have at any time). It is stored in TERRAIN_WINDOW_*.
Definition at line 3076 of file game.cpp.
References g, panel_manager::get_manager(), panel_manager::get_width_left(), panel_manager::get_width_right(), main_ui_adaptor, MINIMAP_HEIGHT, MINIMAP_WIDTH, catacurses::newwin(), point_zero, POSX, POSY, catacurses::stdscr, TERMX, TERMY, TERRAIN_WINDOW_HEIGHT, TERRAIN_WINDOW_TERM_HEIGHT, TERRAIN_WINDOW_TERM_WIDTH, TERRAIN_WINDOW_WIDTH, to_map_font_dimension(), w_minimap, w_minimap_ptr, w_pixel_minimap, w_terrain, and w_terrain_ptr.
|
private |
Definition at line 992 of file game.cpp.
References get_levx(), get_levy(), overmapbuffer::get_npcs_near_player(), overmapbuffer::insert_npc(), NC_DOCTOR, NC_NONE, NPC_MISSION_SHELTER, NPCATT_NULL, one_in(), ORIGIN_OPENER_NPC, overmap_buffer, point_south_east, Character::pos(), mission::reserve_random(), trait_id, and u.
Referenced by start_game().
| T * game::critter_at | ( | const tripoint & | p, |
| bool | allow_hallucination = false |
||
| ) |
Returns the Creature at the given location.
Optionally casted to the given type of creature: npc, player, monster - if there is a creature, but it's not of the requested type, returns nullptr.
| allow_hallucination | Whether to return monsters that are actually hallucinations. |
Definition at line 4674 of file game.cpp.
References active_npc, critter_tracker, effect_ridden, Character::pos(), and u.
Referenced by draw_look_around_cursor(), examine(), find_or_make_stairs(), fling_creature(), forced_door_closing(), get_player_input(), is_empty(), knockback(), phasing_move(), print_all_tile_info(), spawn_hallucination(), swap_critters(), and update_stair_monsters().
| const T * game::critter_at | ( | const tripoint & | p, |
| bool | allow_hallucination = false |
||
| ) | const |
Definition at line 4707 of file game.cpp.
| template Creature * game::critter_by_id< Creature > | ( | const character_id & | id | ) |
Definition at line 4753 of file game.cpp.
References find_npc(), Character::getID(), and u.
|
private |
Definition at line 2524 of file game.cpp.
References achievements_tracker_ptr, diary::death_entry(), disp_NPC_epilogues(), display_faction_epilogues(), Messages::display_messages(), follower_ids, gamemode, avatar::get_avatar_diary(), get_kill_tracker(), show_scores_ui(), stats(), and u.
Referenced by cleanup_at_end().
| void game::despawn_monster | ( | monster & | critter | ) |
Despawn a specific monster, it's stored on the overmap.
Also removes it from the creature tracker. Keep in mind that any monster index may point to a different monster after calling this (or to no monster at all).
Definition at line 11144 of file game.cpp.
References overmapbuffer::despawn_monster(), monster::is_hallucination(), monster::on_unload(), overmap_buffer, remove_zombie(), and monster::set_hp().
Referenced by cleanup_at_end(), monmove(), place_player_overmap(), and shift_monsters().
| bool game::disable_robot | ( | const tripoint & | p | ) |
If there is a robot (that can be disabled), query the player and try to disable it.
Definition at line 8766 of file game.cpp.
References _, monster::add_effect(), map::add_item_or_charges(), add_msg(), monster::ammo, effect_docile, effect_paid, effect_pet, monster::friendly, Creature::has_effect(), monster::has_flag(), mtype::id, m, MF_INTERIOR_AMMO, MF_PAY_BOT, MF_RIDEABLE_MECH, mon_manhack, Creature::moves, monster::name(), num_bp, one_in(), query_yn(), Creature::remove_effect(), remove_zombie(), mtype::revert_to_itype, map::spawn_item(), monster::to_item(), calendar::turn, monster::type, u, UILIST_CANCEL, and tripoint::xy().
Referenced by examine().
|
private |
Definition at line 2963 of file game.cpp.
References overmapbuffer::find_npc(), follower_ids, FULL_SCREEN_HEIGHT, FULL_SCREEN_WIDTH, catacurses::newwin(), overmap_buffer, scrollable_text(), TERMX, and TERMY.
Referenced by death_screen().
| void game::disp_NPCs | ( | ) |
Definition at line 3014 of file game.cpp.
References _, action, all_monsters(), c_white, FULL_SCREEN_HEIGHT, FULL_SCREEN_WIDTH, overmapbuffer::get_npcs_near_player(), Character::global_omt_location(), input_context::handle_input(), m, mvwprintz(), map::name(), om_direction::name(), catacurses::newwin(), overmap_buffer, point_zero, Character::pos(), ui_manager::redraw(), input_context::register_action(), TERMX, TERMY, coords::coord_point< Point, Origin, Scale >::to_string(), tripoint::to_string(), u, catacurses::werase(), and catacurses::wnoutrefresh().
|
private |
Definition at line 2980 of file game.cpp.
References faction_manager_ptr, FULL_SCREEN_HEIGHT, FULL_SCREEN_WIDTH, catacurses::newwin(), scrollable_text(), TERMX, and TERMY.
Referenced by death_screen().
|
private |
Definition at line 11356 of file game.cpp.
References ACTION_DISPLAY_LIGHTING, uilist::addentry(), detail::count(), display_toggle_overlay(), g, MENU_AUTOASSIGN, uilist::query(), uilist::ret, use_tiles, and uilist::w_y_setup.
Referenced by handle_action(), and look_around().
| bool game::display_overlay_state | ( | action_id | action | ) |
Definition at line 11247 of file game.cpp.
References action, and displaying_overlays.
Referenced by display_toggle_overlay(), and display_visibility().
|
private |
Definition at line 11382 of file game.cpp.
References ACTION_DISPLAY_RADIATION, display_toggle_overlay(), and use_tiles.
Referenced by handle_action(), and look_around().
|
private |
Definition at line 11261 of file game.cpp.
References _, ACTION_DISPLAY_SCENT, add_msg(), display_toggle_overlay(), scent_map::draw(), g, inp_mngr, Character::pos(), query_int(), ui_manager::redraw(), scent, u, use_tiles, player::view_offset, w_terrain, and input_manager::wait_for_any_key().
Referenced by handle_action(), and look_around().
|
private |
Definition at line 11282 of file game.cpp.
References ACTION_DISPLAY_TEMPERATURE, display_toggle_overlay(), and use_tiles.
Referenced by handle_action(), and look_around().
| void game::display_toggle_overlay | ( | action_id | action | ) |
Definition at line 11252 of file game.cpp.
References action, display_overlay_state(), and displaying_overlays.
Referenced by display_lighting(), display_radiation(), display_scent(), display_temperature(), display_transparency(), display_vehicle_ai(), and display_visibility().
|
private |
Definition at line 11389 of file game.cpp.
References ACTION_DISPLAY_TRANSPARENCY, display_toggle_overlay(), and use_tiles.
Referenced by handle_action(), and look_around().
|
private |
Definition at line 11289 of file game.cpp.
References ACTION_DISPLAY_VEHICLE_AI, display_toggle_overlay(), and use_tiles.
Referenced by handle_action().
|
private |
Definition at line 11296 of file game.cpp.
References _, ACTION_DISPLAY_VISIBILITY, uilist::addentry(), uilist::callback, creature, display_overlay_state(), display_toggle_overlay(), displaying_visibility_creature, g, anonymous_namespace{overmap_location.cpp}::locations, MENU_AUTOASSIGN, num_creatures(), uilist::query(), uilist::ret, use_tiles, and uilist::w_y_setup.
Referenced by handle_action().
| bool game::do_turn | ( | ) |
MAIN GAME LOOP.
Returns true if game is over (death, saved, quit, etc.).
Definition at line 1455 of file game.cpp.
References _, ACT_AUTODRIVE, Character::action_taken(), Character::activity, add_artifact_dreams(), all_npcs(), Character::apply_wetness_morale(), autopilot_vehicles(), autosave(), map::build_floor_caches(), map::build_map_cache(), calc_driving_offset(), Character::check_and_recover_morale(), Character::check_mount_is_spooked(), cleanup_at_end(), cleanup_dead(), Character::controlling_vehicle, map::creature_in_field(), sfx::do_danger_music(), sfx::do_fatigue(), sfx::do_hearing_loss(), sfx::do_vehicle_engine_sfx(), sfx::do_vehicle_exterior_engine_sfx(), driving_view_offset, effect_sleep, map::emit_field(), explosion_handler::explosion_queue::execute(), first_redraw_since_waiting_started, time_duration::from_minutes(), map::furn(), gamemode, explosion_handler::get_explosion_queue(), map::get_furn_field_locations(), get_levz(), player_activity::get_progress_message(), Character::get_type_of_scent(), get_weather, Character::global_omt_location(), grid_tracker_ptr, handle_action(), vehicle::handle_potential_theft(), handle_weather_effects(), Character::has_active_bionic(), Character::has_destination(), Character::has_distant_destination(), Creature::has_effect(), Character::has_trait(), player_activity::id(), Character::in_vehicle, invalidate_main_ui_adaptor(), player::is_dead_state(), Character::is_deaf(), is_game_over(), Character::is_mounted(), Creature::is_underwater(), load_npcs(), m, MAX_VIEW_DISTANCE, mon_info_update(), monmove(), overmapbuffer::move_hordes(), Creature::moves, moves_since_last_save, new_game, npcs_dirty, int_id< T >::obj(), calendar::once_every(), overmap_buffer, overmap_npc_move(), perhaps_add_random_npc(), Character::pos(), game::debug_hour_timer::print_time(), timed_event_manager::process(), process_activity(), mission::process_all(), map::process_falling(), map::process_fields(), map::process_items(), overmapbuffer::process_mongroups(), sounds::process_sound_markers(), sounds::process_sounds(), player::process_turn(), process_voluntary_act_interrupt(), queue_screenshot, QUIT_WATCH, ui_manager::redraw(), refresh_display(), sfx::remove_hearing_loss(), reset_light_level(), sounds::reset_markers(), rl_dist(), scent, player::scent, scent_map::set(), overmapbuffer::set_scent(), map::spawn_monsters(), take_screenshot(), timed_events, calendar::turn, u, scent_map::update(), Character::update_body(), player::update_body_wetness(), Character::update_bodytemp(), Character::update_morale(), update_stair_monsters(), uquit, map::veh_at(), veh_pointer_or_null(), map::vehmove(), player::volume, wait_popup, point::x, and point::y.
| void game::draw | ( | ) |
Definition at line 3251 of file game.cpp.
References map::build_map_cache(), draw_callbacks, draw_panels(), draw_ter(), m, Character::pos(), ter_view_p, test_mode, u, map::update_visibility_cache(), player::view_offset, w_terrain, catacurses::werase(), catacurses::wnoutrefresh(), and tripoint::z.
| void game::draw_below_override | ( | const tripoint & | p, |
| bool | draw | ||
| ) |
Definition at line 963 of file animation.cpp.
| void game::draw_bullet | ( | const tripoint & | t, |
| int | i, | ||
| const std::vector< tripoint > & | trajectory, | ||
| char | bullet | ||
| ) |
Definition at line 518 of file animation.cpp.
References anonymous_namespace{animation.cpp}::draw_bullet_curses(), and m.
Definition at line 3374 of file game.cpp.
References center, draw_critter_internal(), m, u, and w_terrain.
Referenced by draw_ter().
| void game::draw_cursor | ( | const tripoint & | p | ) |
Definition at line 724 of file animation.cpp.
References c_light_green, mvwputch_inv(), anonymous_namespace{animation.cpp}::relative_view_pos(), w_terrain, and tripoint::xy().
Referenced by draw_look_around_cursor().
| void game::draw_field_override | ( | const tripoint & | p, |
| const field_type_id & | id | ||
| ) |
Definition at line 919 of file animation.cpp.
Definition at line 880 of file animation.cpp.
| void game::draw_graffiti_override | ( | const tripoint & | p, |
| bool | has | ||
| ) |
Definition at line 893 of file animation.cpp.
| void game::draw_highlight | ( | const tripoint & | p | ) |
Definition at line 737 of file animation.cpp.
Definition at line 581 of file animation.cpp.
References dead, anonymous_namespace{animation.cpp}::draw_hit_mon_curses(), m, and u.
| void game::draw_hit_player | ( | const Character & | p, |
| int | dam | ||
| ) |
Definition at line 626 of file animation.cpp.
References anonymous_namespace{animation.cpp}::draw_hit_player_curses().
| void game::draw_item_override | ( | const tripoint & | p, |
| const itype_id & | id, | ||
| const mtype_id & | mid, | ||
| bool | hilite | ||
| ) |
Definition at line 933 of file animation.cpp.
Definition at line 710 of file animation.cpp.
References anonymous_namespace{animation.cpp}::draw_line_curses().
| void game::draw_line | ( | const tripoint & | p, |
| const tripoint & | center_point, | ||
| const std::vector< tripoint > & | points, | ||
| bool | noreveal = false |
||
| ) |
Definition at line 677 of file animation.cpp.
References center, anonymous_namespace{animation.cpp}::draw_line_curses(), Character::sees(), and u.
Referenced by draw_ter().
| void game::draw_look_around_cursor | ( | const tripoint & | lp, |
| const visibility_variables & | cache | ||
| ) |
Definition at line 5824 of file game.cpp.
References map::apparent_light_at(), c_dark_gray, c_light_gray, c_pink, c_white, center, creature, critter_at(), draw_cursor(), map::drawsq(), map::get_visibility(), map::inbounds(), is_draw_tiles_mode(), live_view::is_enabled(), liveview, m, mvwputch(), Character::pos(), POSX, POSY, Character::sees(), u, player::view_offset, VIS_BOOMER, VIS_BOOMER_DARK, VIS_CLEAR, VIS_DARK, VIS_HIDDEN, VIS_LIT, w_terrain, and tripoint::xy().
Referenced by look_around().
|
private |
Definition at line 3452 of file game.cpp.
References c_black, c_blue, c_brown, c_cyan, c_dark_gray, c_green, c_light_blue, c_light_cyan, c_light_gray, c_light_green, c_light_red, c_magenta, c_pink, c_red, c_white, c_yellow, draw_border(), units::fabs(), g, avatar::get_active_mission_target(), oter_t::get_color(), overmapbuffer::get_horde_size(), get_levz(), oter_t::get_symbol(), Character::global_omt_location(), overmapbuffer::has_note(), overmapbuffer::has_vehicle(), HORDE_VISIBILITY_SIZE, overmap::invalid_tripoint, overmapbuffer::is_explored(), mvwputch(), mvwputch_hi(), overmapbuffer::note(), coords::om, overmap_buffer, Character::posz(), red_background(), overmapbuffer::seen(), overmapbuffer::ter(), u, w_minimap, catacurses::werase(), catacurses::wnoutrefresh(), coords::coord_point< Point, Origin, Scale >::x(), coords::coord_point< Point, Origin, Scale >::xy(), coords::coord_point< Point, Origin, Scale >::y(), and coords::coord_point< Point, Origin, Scale >::z().
| void game::draw_monster_override | ( | const tripoint & | p, |
| const mtype_id & | id, | ||
| int | count, | ||
| bool | more, | ||
| Creature::Attitude | att | ||
| ) |
Definition at line 977 of file animation.cpp.
| void game::draw_panels | ( | bool | force_draw = false | ) |
Definition at line 3278 of file game.cpp.
References _, c_light_red, panel_manager::get_manager(), LINE_OXOX, LINE_OXXX, LINE_XOOX, LINE_XOXO, LINE_XXOO, mvwprintz(), mvwputch(), catacurses::newwin(), point_zero, show_panel_adm, TERMX, TERMY, calendar::turn, calendar::turn_zero, u, utf8_width(), catacurses::werase(), and catacurses::wnoutrefresh().
Referenced by draw().
| void game::draw_pixel_minimap | ( | const catacurses::window & | w | ) |
Definition at line 3336 of file game.cpp.
References w_pixel_minimap.
| void game::draw_radiation_override | ( | const tripoint & | p, |
| int | rad | ||
| ) |
Definition at line 854 of file animation.cpp.
| void game::draw_sct | ( | ) |
Definition at line 805 of file animation.cpp.
References anonymous_namespace{animation.cpp}::draw_sct_curses().
Referenced by get_player_input().
| void game::draw_ter | ( | bool | draw_sounds = true | ) |
Definition at line 3392 of file game.cpp.
References draw_ter(), is_looking, Character::pos(), u, and player::view_offset.
Referenced by draw(), and draw_ter().
| void game::draw_ter | ( | const tripoint & | center, |
| bool | looking = false, |
||
| bool | draw_sounds = true |
||
| ) |
Definition at line 3398 of file game.cpp.
References all_creatures(), c_white, center, Character::controlling_vehicle, destination_preview, map::draw(), draw_critter(), draw_footsteps(), draw_line(), draw_veh_dir_indicator(), g, m, mvwputch(), Character::pos(), Character::posx(), POSX, Character::posy(), POSY, ter_view_p, u, player::view_offset, w_terrain, catacurses::wmove(), tripoint::xy(), and tripoint::z.
Definition at line 867 of file animation.cpp.
| void game::draw_trail_to_square | ( | const tripoint & | t, |
| bool | bDrawX | ||
| ) |
Definition at line 7137 of file game.cpp.
References draw_trail(), Character::pos(), and u.
Definition at line 906 of file animation.cpp.
| void game::draw_veh_dir_indicator | ( | bool | next | ) |
Definition at line 3444 of file game.cpp.
References c_dark_gray, c_white, get_veh_dir_indicator_location(), mvwputch(), POSX, POSY, u, player::view_offset, w_terrain, and tripoint::xy().
Referenced by draw_ter().
| void game::draw_vpart_override | ( | const tripoint & | p, |
| const vpart_id & | id, | ||
| int | part_mod, | ||
| units::angle | veh_dir, | ||
| bool | hilite, | ||
| const point & | mount | ||
| ) |
Definition at line 949 of file animation.cpp.
| void game::draw_weather | ( | const weather_printable & | wPrint | ) |
Definition at line 764 of file animation.cpp.
References anonymous_namespace{animation.cpp}::draw_weather_curses(), and w_terrain.
Referenced by get_player_input().
Definition at line 840 of file animation.cpp.
References anonymous_namespace{animation.cpp}::draw_zones_curses(), and w_terrain.
|
private |
Definition at line 8180 of file game.cpp.
References Character::drop(), game_menus::inv::multidrop(), Character::pos(), and u.
Referenced by handle_action().
|
private |
Definition at line 8185 of file game.cpp.
References _, choose_adjacent(), Character::drop(), game_menus::inv::multidrop(), and u.
Referenced by handle_action().
| bool game::dump_stats | ( | const std::string & | what, |
| dump_mode | mode, | ||
| const std::vector< std::string > & | opts | ||
| ) |
write statistics to stdout and
Definition at line 38 of file dump.cpp.
References _, vitamin::all(), item::ammo_capacity(), item::ammo_default(), item::ammo_set(), damage_instance::begin(), item::covers(), damage_instance::empty(), enumerate_as_string(), DynamicDataLoader::finalize_loaded_data(), flag_VARSIZE(), g, get_body_part_token(), mod_management::get_default_core_content_pack(), DynamicDataLoader::get_instance(), itype::gun, item::has_flag(), Skill::ident(), recipe_subset::include(), item_controller, itype_id, units::legacy_volume_factor, load_core_data(), load_packs(), anonymous_namespace{overmap_location.cpp}::locations, item::magazine_default(), item::magazine_integral(), none, num_bp, item::put_in(), recipe_dict, item::set_flag(), Skill::skills, units::to_gram(), to_string(), damage_instance::total_damage(), iexamine::transform(), calendar::turn, and item::type.
| event_bus & game::events | ( | ) |
Definition at line 2879 of file game.cpp.
References event_bus_ptr.
Referenced by cleanup_at_end(), and game().
| void game::exam_vehicle | ( | vehicle & | veh, |
| const point & | cp = point_zero |
||
| ) |
open vehicle interaction screen
Definition at line 5133 of file game.cpp.
References _, act, add_msg(), Character::assign_activity(), c, m_info, vehicle::magic, Creature::moves, vehicle::name, veh_interact::run(), and u.
|
private |
Definition at line 5524 of file game.cpp.
References _, ACTION_EXAMINE, choose_adjacent_highlight(), examine(), m, player::manual_examine, Character::pos(), u, and map::veh_at().
Referenced by examine(), and handle_action().
|
private |
Definition at line 5612 of file game.cpp.
References _, Creature::A_FRIENDLY, add_msg(), monster::attitude_to(), c, critter_at(), disable_robot(), effect_pet, item_stack::empty(), map_data_common_t::examine, iexamine::fireplace(), map::furn(), get_fire_fuel_string(), monster::get_name(), Creature::has_effect(), map::has_flag(), monster::has_flag(), map::has_furn(), map::i_at(), Character::is_mounted(), trap::is_null(), m, m_warning, monexamine::mech_hack(), MF_PAY_BOT, MF_RIDEABLE_MECH, monexamine::mfriend_menu(), Character::mounted_creature, map::name(), none, iexamine::none(), npc_menu(), int_id< T >::obj(), monexamine::pay_bot(), monexamine::pet_menu(), pickup::pick_up(), Character::pos(), sounds::process_sound_markers(), map::ter(), TFLAG_FIRE_CONTAINER, map::tr_at(), iexamine::transform(), iexamine::trap(), u, use_computer(), map::veh_at(), and iexamine::workbench().
| void game::extended_description | ( | const tripoint & | p | ) |
Long description of (visible) things at tile.
Definition at line 51 of file descriptions.cpp.
References _, action, arrow, c_light_gray, c_white, creature, display_mod_source, enumerate_as_string(), map_data_common_t::extended_description(), Creature::extended_description(), fold_and_print_from(), map::furn(), furniture, input_context::get_desc(), get_map, map::get_signage(), input_context::handle_input(), map::has_furn(), Character::has_trait(), left, LINE_OXOX, m, mvwprintz(), mvwputch(), catacurses::newwin(), int_id< T >::obj(), point_zero, ui_manager::redraw(), input_context::register_action(), right, seen_critter(), Character::sees(), ter_t::src, furn_t::src, string_format(), map::ter(), TERMX, TERMY, terrain, trait_ILLITERATE, u, catacurses::werase(), and catacurses::wnoutrefresh().
Referenced by look_around().
|
private |
Definition at line 7065 of file game.cpp.
References closest_points_first(), detail::find(), fov_3d, fov_3d_z_range, map::i_at(), Character::is_blind(), m, om_direction::name(), Character::pos(), Character::posy(), cata::hash64_detail::ret, Character::sees(), map::sees_some_items(), u, and tripoint::z.
Referenced by list_items_monsters().
| npc * game::find_npc | ( | character_id | id | ) |
Find the npc with the given ID.
Returns NULL if the npc could not be found. Searches all loaded overmaps.
Definition at line 1981 of file game.cpp.
References overmapbuffer::find_npc(), and overmap_buffer.
Referenced by critter_by_id().
| cata::optional< tripoint > game::find_or_make_stairs | ( | map & | mp, |
| int | z_after, | ||
| bool & | rope_ladder, | ||
| bool | peeking | ||
| ) |
Returns the other end of the stairs (if any).
May query, affect u etc.
Definition at line 10555 of file game.cpp.
References _, add_msg(), Character::apply_damage(), real_coords::begin_om_pos(), critter_at(), cata::optional< T >::emplace(), find_empty_spot_nearby(), monster::friendly, get_levz(), Character::get_skill_level(), map::getabs(), map::getlocal(), visitable< T >::has_amount(), map::has_flag(), Character::has_trait(), cata::optional< T >::has_value(), map::impassable(), npc::is_enemy(), itype_grapnel, itype_rope_30, m, m_bad, player::mod_pain(), Character::mod_stored_nutr(), Character::mod_thirst(), cata::nullopt, map::points_in_rectangle(), popup(), Character::pos(), Character::posx(), Character::posy(), query_yn(), rl_dist(), rng(), SEEX, skill_dodge, string_format(), t_elevator, t_lava, t_manhole_cover, map::ter(), TFLAG_GOES_DOWN, TFLAG_GOES_UP, trait_VINES2, trait_VINES3, tripoint_above, tripoint_below, u, Character::use_amount(), and cata::optional< T >::value().
Referenced by vertical_move().
| void game::fling_creature | ( | Creature * | c, |
| const units::angle & | dir, | ||
| float | flvel, | ||
| bool | controlled = false, |
||
| bool | suppress_map_update = false |
||
| ) |
Flings the input creature in the given direction.
Definition at line 9893 of file game.cpp.
References _, add_msg(), tileray::advance(), monster::apply_damage(), map::bash(), map::bash_strength(), c, Creature::check_dead_state(), map::creature_on_trap(), critter_at(), debugmsg, tileray::dx(), tileray::dy(), monster::get_armor_bash(), map::has_flag(), mtype::hp, map::impassable(), Character::in_vehicle, inp_mngr, invalidate_main_ui_adaptor(), map::is_bashable(), monster::is_dead(), trap::loadid, m, m_warning, optional_vpart_position::obstacle_at_part(), map::obstructed_by_vehicle_rotation(), one_in(), map::passable(), Character::pos(), input_manager::pump_events(), ui_manager::redraw_invalidated(), refresh_display(), rng(), Character::sees(), Character::setpos(), map::tr_at(), tr_ledge, monster::type, u, map::unboard_vehicle(), update_map(), map::veh_at(), tripoint::x, and tripoint::y.
Referenced by moving_vehicle_dismount().
Definition at line 5146 of file game.cpp.
References _, Character::activity, map::add_item_or_charges(), add_msg(), monster::apply_damage(), item_stack::begin(), Character::cancel_activity(), Creature::check_dead_state(), critter_at(), monster::die_in_explosion(), item_stack::empty(), item_stack::end(), map_stack::erase(), g, map::has_flag(), Character::hitall(), map::i_at(), monster::is_dead(), player::is_npc(), player::is_player(), knockback(), LIQUID, m, m_bad, m_warning, MS_HUGE, MS_SMALL, Character::name, map_data_common_t::name(), monster::name(), int_id< T >::obj(), one_in(), map::points_in_radius(), random_point(), Character::sees(), mtype::size, map::ter_set(), monster::type, u, and map::veh_at().
| special_game_id game::gametype | ( | ) | const |
Returns a creature matching a predicate.
Only living (not dead) creatures are checked. Returns nullptr if no creature matches the predicate. There is no guarantee which creature is returned when several creatures match.
Definition at line 12129 of file game.cpp.
References all_creatures().
| std::vector< Creature * > game::get_creatures_if | ( | const std::function< bool(const Creature &)> & | pred | ) |
Returns all creatures matching a predicate.
Only living ( not dead ) creatures are checked ( and returned ). Returned pointers are never null.
Definition at line 12039 of file game.cpp.
References all_creatures().
| overmap & game::get_cur_om | ( | ) | const |
The overmap which contains the center submap of the reality bubble.
Definition at line 12019 of file game.cpp.
References overmapbuffer::get(), map::get_abs_sub(), HALF_MAPSIZE, m, overmap_buffer, coords::sm, sm_to_om_copy(), and tripoint::xy().
Referenced by start_game().
| std::vector< std::string > game::get_dangerous_tile | ( | const tripoint & | dest_loc | ) | const |
Definition at line 8850 of file game.cpp.
References bp_arm_l, bp_arm_r, bp_eyes, bp_foot_l, bp_foot_r, bp_hand_l, bp_hand_r, bp_head, bp_leg_l, bp_leg_r, bp_mouth, bp_torso, trap::can_see(), Character::dex_cur, DT_CUT, map::field_at(), Character::get_armor_bash(), map::has_flag(), map::has_zlevels(), player::immune_to(), Character::in_vehicle, trap::is_benign(), Character::is_blind(), Creature::is_dangerous_field(), trap::loadid, m, trap::name(), map::name(), optional_vpart_position::part_with_feature(), Character::pos(), map::tr_at(), tr_ledge, u, and map::veh_at().
Referenced by is_dangerous_tile(), prompt_dangerous_tile(), and walk_move().
| std::unordered_set< tripoint > game::get_fishable_locations | ( | int | distance, |
| const tripoint & | fish_pos | ||
| ) |
Get the contiguous fishable locations starting at fish_pos, out to the specificed distance.
| distance | Distance around the fish_pos to examine for contiguous fishable locations. |
| fish_pos | The location being fished. |
Definition at line 3761 of file game.cpp.
References inclusive_cuboid< Tripoint, >::contains(), map::has_flag(), m, point_east, point_north, point_south, and point_west.
| std::vector< monster * > game::get_fishable_monsters | ( | std::unordered_set< tripoint > & | fishable_locations | ) |
Get the fishable monsters within the provided fishable locations.
| fishable_locations | A set of locations which are valid fishable terrain. Any fishable monsters are filtered by this collection to determine those which can actually be caught. |
Definition at line 3819 of file game.cpp.
References all_monsters(), and MF_FISHABLE.
| std::set< character_id > game::get_follower_list | ( | ) |
| const kill_tracker & game::get_kill_tracker | ( | ) | const |
Definition at line 987 of file game.cpp.
References kill_tracker_ptr.
Referenced by cleanup_at_end(), death_screen(), handle_action(), and win().
| int game::get_levx | ( | ) | const |
The top left corner of the reality bubble (in submaps coordinates).
This is the same as map::abs_sub of the m map.
Definition at line 12004 of file game.cpp.
References map::get_abs_sub(), m, and tripoint::x.
Referenced by create_starting_npcs(), load_npcs(), look_around(), save_cyborg(), spawn_hallucination(), vertical_move(), and vertical_shift().
| int game::get_levy | ( | ) | const |
Definition at line 12009 of file game.cpp.
References map::get_abs_sub(), m, and tripoint::y.
Referenced by create_starting_npcs(), load_npcs(), look_around(), save_cyborg(), spawn_hallucination(), vertical_move(), and vertical_shift().
| int game::get_levz | ( | ) | const |
Definition at line 12014 of file game.cpp.
References map::get_abs_sub(), m, and tripoint::z.
Referenced by do_turn(), draw_minimap(), find_or_make_stairs(), get_player_input(), scent_map::get_unsafe(), scent_map::inbounds(), load_npcs(), look_around(), perhaps_add_random_npc(), place_player(), place_player_overmap(), replace_stair_monsters(), start_game(), update_map(), update_stair_monsters(), vertical_move(), and vertical_shift().
| int game::get_moves_since_last_save | ( | ) | const |
Definition at line 7241 of file game.cpp.
References moves_since_last_save.
Definition at line 12051 of file game.cpp.
References all_npcs().
Referenced by allies(), chat(), and validate_npc_followers().
| std::string game::get_player_base_save_path | ( | ) | const |
Base path for saving player data.
Just add a suffix (unique for the thing you want to save) and use the resulting path. Example: save_ui_data(get_player_base_save_path()+".ui")
Definition at line 12139 of file game.cpp.
References base64_encode(), get_world_base_save_path(), Character::name, and u.
Referenced by save_player_data().
|
private |
Definition at line 240 of file handle_action.cpp.
References _, action, ACTION_CENTER, action_ident(), ACTION_KEYBINDINGS, ACTION_LOOK, ACTION_SHIFT_E, ACTION_SHIFT_N, ACTION_SHIFT_NE, ACTION_SHIFT_NW, ACTION_SHIFT_S, ACTION_SHIFT_SE, ACTION_SHIFT_SW, ACTION_SHIFT_W, ACTION_TOGGLE_MAP_MEMORY, add_draw_callback(), scrollingcombattext::advanceAllSteps(), c_red, critter_at(), draw_sct(), draw_weather(), generate_weather_anim_frame(), get_default_mode_input_context(), input_context::get_desc(), get_levz(), get_weather, handle_mouseview(), user_turn::has_timeout_elapsed(), init_weather_anim(), invalidate_main_ui_adaptor(), m, minimap_requires_animation(), Character::posz(), QUIT_WATCH, ui_manager::redraw_invalidated(), input_context::register_action(), input_context::reset_timeout(), SCT, Character::sees(), input_context::set_iso(), input_context::set_timeout(), terrain_requires_animation(), to_translation(), u, map::update_visibility_cache(), uquit, utf8_width(), and scrollingcombattext::vSCT.
Referenced by handle_action().
| unsigned int game::get_seed | ( | ) | const |
| int game::get_user_action_counter | ( | ) | const |
Definition at line 7246 of file game.cpp.
References user_action_counter.
| cata::optional< tripoint > game::get_veh_dir_indicator_location | ( | bool | next | ) | const |
Returns the location where the indicator should go relative to the reality bubble, or nothing to indicate no indicator should be drawn.
Based on the vehicle the player is driving, if any.
| next | If true, bases it on the vehicle the vehicle will turn to next turn, instead of the one it is currently facing. |
Definition at line 3429 of file game.cpp.
References vehicle::dir_vec(), vehicle::face_vec(), m, cata::nullopt, Character::pos(), u, map::veh_at(), rl_vec2d::x, rl_vec2d::y, and tripoint::z.
Referenced by draw_veh_dir_indicator().
| std::string game::get_world_base_save_path | ( | ) | const |
Base path for saving world data.
This yields a path to a folder.
Definition at line 12144 of file game.cpp.
References PATH_INFO::savedir(), and world_generator.
Referenced by get_player_base_save_path(), load(), load_master(), move_save_to_graveyard(), save(), save_artifacts(), and save_factions_missions_npcs().
| int game::get_zoom | ( | ) | const |
Definition at line 7232 of file game.cpp.
References DEFAULT_TILESET_ZOOM, and tileset_zoom.
Referenced by look_around().
|
private |
Definition at line 9653 of file game.cpp.
References _, add_msg(), item_stack::begin(), active_tile_data::clone(), item_stack::end(), f_null, fd_fire, map::furn(), active_tiles::furn_at< active_tile_data >(), map::furn_set(), map::get_field_age(), map::get_field_intensity(), Character::get_str(), map::getabs(), avatar::grab(), player::grab_point, map_data_common_t::has_flag(), map::has_flag(), map::has_floor(), map::has_furn(), map::i_at(), map::i_clear(), map::impassable(), map_stack::insert(), is_empty(), trap::is_null(), m, m_bad, m_info, player::mod_pain(), avatar_action::move(), furn_t::move_str_req, sounds::movement, Creature::moves, map_data_common_t::name(), int_id< T >::obj(), OBJECT_NONE, one_in(), map::passable(), Character::pos(), map::remove_field(), map::set_field_age(), map::set_field_intensity(), item_stack::size(), sounds::sound(), map::tername(), map::tr_at(), u, map::veh_at(), tripoint::x, and tripoint::y.
Referenced by grabbed_move().
|
private |
Check for dangerous stuff at dest_loc, return false if the player decides not to step there.
Definition at line 9825 of file game.cpp.
References _, add_msg(), avatar::get_grab_type(), avatar::grab(), player::grab_point, grabbed_furn_move(), grabbed_veh_move(), m_info, OBJECT_FURNITURE, OBJECT_NONE, OBJECT_VEHICLE, u, tripoint::x, tripoint::y, and tripoint::z.
Referenced by walk_move().
|
private |
Definition at line 21 of file grab.cpp.
References _, add_msg(), vehicle::adjust_zlevel(), vehicle::check_falling_or_floating(), vehicle::collision(), debugmsg, dice(), tileray::dir(), map::displace_vehicle(), effect_harnessed, vehicle::face, failed, g, monster::get_name(), vehicle::get_pet(), Character::get_str(), vehicle::global_part_pos3(), vehicle::global_pos3(), avatar::grab(), player::grab_point, vehicle::handle_potential_theft(), vehicle::handle_trap(), Creature::has_effect(), tileray::init(), vehicle::invalidate_mass(), m, m_bad, m_info, player::mod_pain(), map::move_cost(), sounds::movement, Creature::moves, vehicle::name, OBJECT_NONE, one_in(), vehicle::part(), vehicle::part_count(), vehicle::pivot_point(), Character::pos(), vehicle_part::precalc, vehicle::precalc_mounts(), Character::setpos(), vehicle::shift_zlevel(), sounds::sound(), vehicle::total_mass(), tripoint_zero, vehicle::turn(), vehicle::turn_dir, u, vehicle::valid_wheel_config(), map::veh_at(), veh_pointer_or_null(), vehicle::wheelcache, tripoint::x, tripoint::xy(), and tripoint::y.
Referenced by grabbed_move().
|
private |
Definition at line 1516 of file handle_action.cpp.
References _, Creature::A_ANY, achievements_tracker_ptr, act, action, ACTION_ACTIONMENU, ACTION_ADVANCEDINV, ACTION_AUTOATTACK, ACTION_AUTONOTES, ACTION_AUTOPICKUP, ACTION_BIONICS, ACTION_BUTCHER, ACTION_CAST_SPELL, ACTION_CENTER, ACTION_CHAT, ACTION_CLOSE, ACTION_COLOR, ACTION_COMPARE, ACTION_CONSTRUCT, ACTION_CONTROL_VEHICLE, ACTION_CRAFT, ACTION_CYCLE_MOVE, ACTION_DEBUG, ACTION_DIARY, ACTION_DIR_DROP, ACTION_DISASSEMBLE, ACTION_DISPLAY_LIGHTING, ACTION_DISPLAY_RADIATION, ACTION_DISPLAY_SCENT, ACTION_DISPLAY_SCENT_TYPE, ACTION_DISPLAY_SUBMAP_GRID, ACTION_DISPLAY_TEMPERATURE, ACTION_DISPLAY_TRANSPARENCY, ACTION_DISPLAY_VEHICLE_AI, ACTION_DISPLAY_VISIBILITY, ACTION_DISTRACTION_MANAGER, ACTION_DROP, ACTION_EAT, ACTION_EXAMINE, ACTION_FACTIONS, ACTION_FIRE, ACTION_FIRE_BURST, ACTION_GRAB, ACTION_HAUL, ACTION_HELP, action_ident(), ACTION_IGNORE_ENEMY, ACTION_INVENTORY, ACTION_ITEMACTION, ACTION_KEYBINDINGS, ACTION_LIST_ITEMS, ACTION_LONGCRAFT, ACTION_LOOK, ACTION_LOOT, ACTION_MAIN_MENU, ACTION_MAP, ACTION_MEND, ACTION_MESSAGES, ACTION_MISSIONS, ACTION_MORALE, ACTION_MOVE_BACK, ACTION_MOVE_BACK_LEFT, ACTION_MOVE_BACK_RIGHT, ACTION_MOVE_DOWN, ACTION_MOVE_FORTH, ACTION_MOVE_FORTH_LEFT, ACTION_MOVE_FORTH_RIGHT, ACTION_MOVE_LEFT, ACTION_MOVE_RIGHT, ACTION_MOVE_UP, ACTION_MUTATIONS, ACTION_NULL, ACTION_OPEN, ACTION_OPEN_CONSUME, ACTION_OPEN_MOVEMENT, ACTION_OPTIONS, ACTION_ORGANIZE, ACTION_PAUSE, ACTION_PEEK, ACTION_PICK_STYLE, ACTION_PICKUP, ACTION_PICKUP_FEET, ACTION_PL_INFO, ACTION_QUICKLOAD, ACTION_QUICKSAVE, ACTION_READ, ACTION_RECRAFT, ACTION_RELOAD_ITEM, ACTION_RELOAD_TILESET, ACTION_RELOAD_WEAPON, ACTION_RELOAD_WIELDED, ACTION_RESET_MOVE, ACTION_SAFEMODE, ACTION_SAVE, ACTION_SCORES, ACTION_SEC_SELECT, ACTION_SELECT, ACTION_SELECT_DEFAULT_AMMO, ACTION_SELECT_FIRE_MODE, ACTION_SHIFT_E, ACTION_SHIFT_N, ACTION_SHIFT_NE, ACTION_SHIFT_NW, ACTION_SHIFT_S, ACTION_SHIFT_SE, ACTION_SHIFT_SW, ACTION_SHIFT_W, ACTION_SKY, ACTION_SLEEP, ACTION_SMASH, ACTION_SORT_ARMOR, ACTION_SUICIDE, ACTION_TAKE_OFF, ACTION_THROW, ACTION_TIMEOUT, ACTION_TOGGLE_AUTO_FEATURES, ACTION_TOGGLE_AUTO_FORAGING, ACTION_TOGGLE_AUTO_MINING, ACTION_TOGGLE_AUTO_PICKUP, ACTION_TOGGLE_AUTO_PULP_BUTCHER, ACTION_TOGGLE_AUTO_TRAVEL_MODE, ACTION_TOGGLE_AUTOSAFE, ACTION_TOGGLE_CROUCH, ACTION_TOGGLE_DEBUG_MODE, ACTION_TOGGLE_FULLSCREEN, ACTION_TOGGLE_HOUR_TIMER, ACTION_TOGGLE_MAP_MEMORY, ACTION_TOGGLE_PANEL_ADM, ACTION_TOGGLE_PIXEL_MINIMAP, ACTION_TOGGLE_RUN, ACTION_TOGGLE_SAFEMODE, ACTION_TOGGLE_THIEF_MODE, ACTION_UNLOAD, ACTION_USE, ACTION_USE_WIELDED, ACTION_WAIT, ACTION_WEAR, ACTION_WHITELIST_ENEMY, ACTION_WIELD, ACTION_WORLD_MODS, ACTION_ZONES, ACTION_ZOOM_IN, ACTION_ZOOM_OUT, add_msg(), safemode::add_rule(), all_colors, Character::apply_damage(), auto_travel_mode, avatar_action::autoattack(), bio_remote, body_part_head, butcher(), can_action_change_worldstate(), cast_spell(), chat(), check_safe_mode_allowed(), Character::clear_destination(), close(), doors::close_door(), game_menus::inv::common(), game_menus::inv::compare(), construction_menu(), control_vehicle(), Character::controlling_vehicle, player::craft(), create_advanced_inv(), avatar::cycle_move_mode(), dbg, debug_menu::debug(), debug_mode, destination_preview, crafting::disassemble(), Character::dismount(), character_display::disp_info(), avatar::disp_morale(), ui::omap::display(), help::display_help(), display_lighting(), input_context::display_menu(), Messages::display_messages(), item::display_name(), display_radiation(), display_scent(), display_temperature(), display_transparency(), display_vehicle_ai(), display_visibility(), ui::omap::display_visible_weather(), driving_view_offset, drop(), drop_in_direction(), avatar_action::eat(), avatar_action::eat_here(), effect_laserlocked, examine(), faction_manager_ptr, fire(), avatar_action::fire_wielded_weapon(), g, gamemode, get_auto_notes_settings(), get_auto_pickup(), avatar::get_avatar_diary(), input_context::get_coordinates(), get_delta_from_movement_action(), get_distraction_manager(), input_event::get_first_input(), get_help(), input_manager::get_keyname(), get_kill_tracker(), panel_manager::get_manager(), avatar::get_mon_visible(), Character::get_next_auto_move_direction(), options_manager::get_option(), get_option(), get_options(), Character::get_path_avoid(), Character::get_pathfinding_settings(), get_player_input(), input_context::get_raw_input(), get_safemode(), Creature::get_value(), grab(), item::gun_all_modes(), item::gun_cycle_mode(), item::gun_set_mode(), handbrake(), handle_action_menu(), handle_main_menu(), Character::has_active_bionic(), Character::has_active_item(), Character::has_active_mutation(), Character::has_destination(), Character::has_destination_activity(), Creature::has_effect(), Character::has_trait(), haul(), monster::ignoring, Character::in_vehicle, Info, inp_mngr, Character::is_armed(), Character::is_auto_moving(), player::is_dead_state(), item::is_gun(), item::is_gunmod(), Character::is_mounted(), map::is_outside(), MAP_SHARING::isCompetitive(), MAP_SHARING::isDebugger(), item_action_menu(), itype_radiocontrol, list_items_monsters(), list_missions(), player::long_craft(), look_around(), look_up_action(), loot(), m, m_bad, m_info, m_warning, mark_main_ui_adaptor_resize(), Character::martial_arts_data, avatar_action::mend(), MF_RIDEABLE_MECH, Creature::mod_moves(), mostseen, Character::mounted_creature, avatar_action::move(), player::movecounter, Creature::moves, user_turn::moves_elapsed(), om_direction::name(), monster_visible_info::new_seen_mon, no, cata::nullopt, NUM_ACTIONS, open(), open_consume_item_menu(), open_movement_mode_menu(), player::pause(), peek(), pickup(), pickup_feet(), Character::place_corpse(), pldrive(), avatar_action::plthrow(), point_east, point_north, point_north_east, point_north_west, point_south, point_south_east, point_south_west, point_west, point_zero, Character::pos(), monster::pos(), Character::posx(), Character::posy(), Character::posz(), player::power_bionics(), player::power_mutations(), press_x(), press_x_if_bound(), ranged::prompt_select_default_ammo_for(), query_yn(), quickload(), quicksave(), QUIT_DIED, QUIT_SAVED, QUIT_SUICIDE, QUIT_WATCH, rcdrive(), read(), player::recraft(), avatar_action::reload_item(), reload_tileset(), avatar_action::reload_weapon(), avatar_action::reload_wielded(), remoteveh(), Creature::remove_effect(), avatar::reset_move_mode(), rl_dist(), map::route(), RULE_WHITELISTED, safe_mode, SAFE_MODE_OFF, SAFE_MODE_ON, SAFE_MODE_STOP, safe_mode_warning_logged, save(), options_manager::save(), Character::sees(), SEEX, input_event::sequence, Character::set_destination(), set_safe_mode(), Creature::set_value(), options_manager::cOpt::setNext(), auto_pickup::player_settings::show(), distraction_manager::distraction_manager_gui::show(), safemode::show(), options_manager::show(), panel_manager::show_adm(), diary::show_diary_ui(), auto_notes::auto_note_settings::show_gui(), show_scores_ui(), sleep(), smash(), player::sort_armor(), Character::start_destination_activity(), stats(), string_format(), game_menus::inv::swap_letters(), takeoff(), tile_iso, avatar::toggle_crouch_mode(), toggle_debug_hour_timer(), toggle_fullscreen(), avatar::toggle_map_memory(), toggle_pixel_minimap(), avatar::toggle_run_mode(), trait_PROF_CHURL, trait_SHELL2, tripoint_above, tripoint_below, try_get_left_click_action(), try_get_right_click_action(), calendar::turn, turnssincelastmon, input_event::type, u, avatar_action::unload(), uquit, avatar_action::use_item(), use_tiles, player::use_wielded(), user_action_counter, map::veh_at(), vertical_move(), player::view_offset, w_terrain, wait(), Character::weapon, wear(), avatar_action::wield(), world_generator, point::x, tripoint::x, point::y, tripoint::y, yes, zones_manager(), zoom_in(), and zoom_out().
Referenced by do_turn().
|
private |
Definition at line 2083 of file game.cpp.
References _, action, Character::activity, cancel_activity_query(), character_display::disp_info(), help::display_help(), Messages::display_messages(), get_default_mode_input_context(), get_help(), input_context::handle_input(), player_activity::interruptable_with_kb, ui_manager::redraw(), catacurses::refresh(), refresh_display(), and u.
Referenced by process_voluntary_act_interrupt().
|
private |
Definition at line 2109 of file game.cpp.
References action, input_context::get_coordinates(), input_context::handle_input(), live_view::hide(), liveview, ui_manager::redraw(), cata::optional< T >::reset(), live_view::show(), and w_terrain.
Referenced by get_player_input().
| bool game::has_gametype | ( | ) | const |
Definition at line 641 of file game.cpp.
References gamemode, and SGAME_NULL.
|
private |
Definition at line 11396 of file game.cpp.
References last_save_timestamp, and moves_since_last_save.
Referenced by load(), and start_game().
| item_location game::inv_map_splice | ( | item_filter | filter, |
| const std::string & | title, | ||
| int | radius = 0, |
||
| const std::string & | none_message = "" |
||
| ) |
Custom-filtered menu for inventory and nearby items and those that within specified radius.
Definition at line 397 of file game_inventory.cpp.
References convert_filter(), inv_internal(), PATH_INFO::title(), and u.
| void game::invalidate_main_ui_adaptor | ( | ) | const |
Definition at line 3139 of file game.cpp.
References main_ui_adaptor.
Referenced by add_draw_callback(), cancel_activity_or_ignore_query(), cancel_activity_query(), do_turn(), fling_creature(), get_player_input(), list_items(), list_monsters(), look_around(), and zones_manager().
| bool game::is_core_data_loaded | ( | ) | const |
Returns whether the core data is currently loaded.
Definition at line 441 of file game.cpp.
References DynamicDataLoader::get_instance(), and DynamicDataLoader::is_data_finalized().
| bool game::is_dangerous_tile | ( | const tripoint & | dest_loc | ) | const |
Definition at line 8828 of file game.cpp.
References get_dangerous_tile().
Referenced by walk_move().
| bool game::is_empty | ( | const tripoint & | p | ) |
Returns true if there is no player, NPC, or monster on the tile and move_cost > 0.
Definition at line 4979 of file game.cpp.
References critter_at(), map::has_flag(), m, and map::passable().
Referenced by grabbed_furn_move(), monmove(), place_player(), and update_stair_monsters().
|
private |
Definition at line 2477 of file game.cpp.
References _, dbg, Messages::deactivate(), Character::dodges_left, Error, Character::in_vehicle, player::is_dead_state(), is_game_over(), m, Creature::moves, Character::place_corpse(), Character::pos(), query_yn(), QUIT_DIED, QUIT_NO, QUIT_SUICIDE, QUIT_WATCH, player::set_pain(), u, map::unboard_vehicle(), and uquit.
Referenced by do_turn(), and is_game_over().
| Creature * game::is_hostile_nearby | ( | ) |
Definition at line 3738 of file game.cpp.
References is_hostile_within(), and MAX_VIEW_DISTANCE.
| Creature * game::is_hostile_very_close | ( | ) |
Definition at line 3745 of file game.cpp.
References DANGEROUS_PROXIMITY, and is_hostile_within().
Referenced by butcher(), and process_voluntary_act_interrupt().
|
private |
Definition at line 3750 of file game.cpp.
References Creature::A_HOSTILE, Character::attitude_to(), Character::get_visible_creatures(), and u.
Referenced by is_hostile_nearby(), and is_hostile_very_close().
| bool game::is_in_sunlight | ( | const tripoint & | p | ) |
Returns true if p is outdoors and it is sunny.
Definition at line 4985 of file game.cpp.
References get_weather, weather::is_in_sunlight(), and m.
Referenced by process_artifact().
| bool game::is_in_viewport | ( | const tripoint & | p, |
| int | margin = 0 |
||
| ) | const |
Definition at line 3384 of file game.cpp.
References catacurses::getmaxx(), catacurses::getmaxy(), Character::pos(), u, player::view_offset, w_terrain, tripoint::x, and tripoint::y.
| bool game::is_sheltered | ( | const tripoint & | p | ) |
Returns true if p is indoors, underground, or in a car.
Definition at line 4990 of file game.cpp.
References weather::is_sheltered(), and m.
| bool game::is_zones_manager_open | ( | ) | const |
Definition at line 6168 of file game.cpp.
References zones_manager_open.
|
private |
Definition at line 231 of file item_action.cpp.
References _, action, uilist::additional_actions, bio_claws, bio_claws_weapon, bio_tools, uilist::callback, item_action_generator::generator(), Character::has_active_bionic(), uilist::input_category, num, popup(), input_context::register_action(), second, uilist::text, iexamine::transform(), calendar::turn, and u.
Referenced by handle_action().
| void game::knockback | ( | const tripoint & | s, |
| const tripoint & | t, | ||
| int | force, | ||
| int | stun, | ||
| int | dam_mult, | ||
| Creature * | source | ||
| ) |
Definition at line 4402 of file game.cpp.
References continue_line(), knockback(), and line_to().
Referenced by forced_door_closing(), and knockback().
| void game::knockback | ( | std::vector< tripoint > & | traj, |
| int | stun, | ||
| int | dam_mult, | ||
| Creature * | source = nullptr |
||
| ) |
Definition at line 4419 of file game.cpp.
References _, Creature::add_effect(), add_msg(), map::bash(), Creature::check_dead_state(), critter_at(), Character::deal_damage(), debugmsg, DT_BASH, effect_stunned, Character::footwear_factor(), Creature::has_effect(), map::has_flag(), Character::has_trait(), map::impassable(), knockback(), m, m_bad, MF_AQUATIC, map::obstructed_by_vehicle_rotation(), one_in(), Character::pos(), Character::posx(), Character::posy(), Character::sees(), Character::setpos(), avatar_action::swim(), trait_LEG_TENT_BRACE, u, vgettext(), tripoint::x, tripoint::y, and tripoint::z.
| unsigned char game::light_level | ( | int | zlev | ) | const |
Returns coarse number-of-squares of visibility at the current light level.
Used by monster and NPC AI.
Definition at line 3717 of file game.cpp.
References light, LIGHT_RANGE, and natural_light_level().
Referenced by calc_driving_offset(), and update_overmap_seen().
| std::vector< std::string > game::list_active_characters | ( | ) |
Returns a list of currently active character saves.
Definition at line 2924 of file game.cpp.
References world_generator.
Referenced by cleanup_at_end().
|
private |
Definition at line 7411 of file game.cpp.
References _, action, add_draw_callback(), add_msg(), c_light_gray, c_light_green, c_magenta, c_red, c_white, c_yellow, calcStartPos(), centerlistview(), CHANGE_TAB, clamp(), item::color_in_inventory(), game_menus::inv::compare(), create_trail_callback(), string_input_popup::description(), direction_from(), direction_name_short(), item::display_name(), draw_custom_border(), draw_item_filter_rules(), draw_item_info(), draw_scrollbar(), string_input_popup::edit(), map_item_stack::example, FILTER, filter_item_stacks(), Character::get_path_avoid(), Character::get_pathfinding_settings(), input_context::handle_input(), item_info_data::handle_scrolling, high, HIGH_PRIORITY, string_input_popup::identifier(), item::info(), invalidate_main_ui_adaptor(), LINE_XOXX, LINE_XXXO, list_filter_high_priority(), list_filter_low_priority(), list_item_downvote, uistatedata::list_item_downvote, uistatedata::list_item_downvote_active, uistatedata::list_item_filter, uistatedata::list_item_filter_active, uistatedata::list_item_init, uistatedata::list_item_priority, uistatedata::list_item_priority_active, uistatedata::list_item_sort, list_item_upvote, LOW_PRIORITY, m, m_info, map_item_stack::map_item_stack_sort(), string_input_popup::max_length(), catacurses::mvwprintw(), mvwprintz(), catacurses::newwin(), cata::nullopt, point_south, point_zero, Character::pos(), string_input_popup::query_string(), QUIT, ui_manager::redraw(), input_context::register_action(), remove_color_tags(), reset_item_list_state(), rl_dist(), map::route(), Character::sees(), Character::set_destination(), sFilter, string_format(), TERMX, TERMY, string_input_popup::text(), string_input_popup::title(), item::tname(), to_translation(), trim_and_print(), tripoint_zero, item::type_name(), u, uistate, utf8_width(), cata::optional< T >::value(), player::view_offset, map_item_stack::vIG, catacurses::werase(), string_input_popup::width(), item_info_data::without_border, item_info_data::without_getch, catacurses::wnoutrefresh(), catacurses::wprintw(), and wprintz().
Referenced by list_items_monsters().
|
private |
Definition at line 7366 of file game.cpp.
References _, add_msg(), CHANGE_TAB, current_daylight_level(), find_nearby_items(), FIRE, avatar_action::fire_wielded_weapon(), Character::get_visible_creatures(), list_items(), list_monsters(), m_info, reenter_fullscreen(), cata::hash64_detail::ret, temp_exit_fullscreen(), calendar::turn, u, uistate, and uistatedata::vmenu_show_items.
Referenced by handle_action(), and look_around().
| void game::list_missions | ( | ) |
Definition at line 22 of file mission_ui.cpp.
References _, action, BORDER_COLOR, c_light_green, c_light_red, c_white, debugmsg, Character::disp_name(), draw_border_below_tabs(), draw_scrollbar(), draw_tabs(), fold_and_print(), FULL_SCREEN_HEIGHT, FULL_SCREEN_WIDTH, g, avatar::get_active_mission(), avatar::get_active_missions(), avatar::get_completed_missions(), avatar::get_failed_missions(), catacurses::getmaxx(), Character::global_omt_location(), input_context::handle_input(), Character::has_watch(), hilite(), LINE_OXXX, LINE_XOXO, LINE_XXOX, mvwprintz(), mvwputch(), new_centered_win(), ui_manager::redraw(), input_context::register_action(), input_context::register_cardinal(), replace_all(), avatar::set_active_mission(), string_format(), anonymous_namespace{bionics_ui.cpp}::TAB_ACTIVE, coords::coord_point< Point, Origin, Scale >::to_string(), to_string(), to_string_approx(), translate_marker, trim_and_print(), calendar::turn, u, catacurses::werase(), and catacurses::wnoutrefresh().
Referenced by handle_action().
|
private |
Definition at line 7857 of file game.cpp.
References _, Creature::A_ANY, action, add_draw_callback(), safemode::add_rule(), bVMonsterLookFire, c_light_gray, c_light_green, c_magenta, c_white, c_yellow, calcStartPos(), centerlistview(), CHANGE_TAB, color(), create_trail_callback(), direction_from(), direction_name_short(), draw_custom_border(), draw_scrollbar(), FIRE, g, npc::get_attitude(), Creature::get_attitude_ui_data(), get_hp_bar(), get_safemode(), catacurses::getmaxy(), item::gun_range(), input_context::handle_input(), safemode::has_rule(), hilite(), invalidate_main_ui_adaptor(), player::last_target, LINE_XOXO, LINE_XOXX, LINE_XXXO, look_around(), m, MAX_RECOIL, catacurses::mvwprintw(), mvwprintz(), map::name(), catacurses::newwin(), npc_attitude_name(), safemode::npc_type_name(), cata::nullopt, point_east, point_south, point_zero, Creature::pos(), Character::pos(), input_context::press_x(), Creature::print_info(), QUIT, Character::recoil, ui_manager::redraw(), input_context::register_action(), safemode::remove_rule(), rl_dist(), RULE_BLACKLISTED, shared_from(), shortcut_print(), Character::symbol_color(), TERMX, TERMY, to_translation(), trim_and_print(), tripoint_zero, u, player::view_offset, Character::weapon, catacurses::werase(), catacurses::wnoutrefresh(), catacurses::wprintw(), and wprintz().
Referenced by list_items_monsters().
|
private |
Definition at line 2644 of file game.cpp.
References _, assign_npc_id(), uistatedata::deserialize(), g, gamemode, get_auto_notes_settings(), get_auto_pickup(), avatar::get_avatar_diary(), zone_manager::get_manager(), get_safemode(), get_weather, get_world_base_save_path(), Character::getID(), Character::in_vehicle, init_autosave(), Character::inv_dump(), character_id::is_valid(), auto_notes::auto_note_settings::load(), diary::load(), memorial_logger::load(), auto_pickup::player_settings::load_character(), safemode::load_character(), avatar::load_map_memory(), load_master(), zone_manager::load_zones(), m, memorial(), mostseen, Character::name, om_direction::name(), weather_manager::nextweather, optional_vpart_position::part_with_feature(), popup(), Character::pos(), read_from_file(), read_from_file_optional(), Character::recalc_sight_limits(), ui_manager::redraw(), refresh_display(), reload_npcs(), Character::reset(), safe_mode, SAFE_MODE_OFF, SAFE_MODE_ON, SAVE_EXTENSION(), SAVE_EXTENSION_LOG(), SAVE_EXTENSION_SHORTCUTS(), calendar::set_eternal_season(), calendar::set_season_length(), Character::setID(), calendar::start_of_cataclysm, calendar::turn, u, uistate, unserialize(), update_map(), validate_camps(), validate_linked_vehicles(), validate_mounted_npcs(), validate_npc_followers(), map::veh_at(), and Character::weapon.
| bool game::load | ( | const std::string & | world | ) |
Attempt to load first valid save (if any) in world.
Definition at line 2620 of file game.cpp.
References debugmsg, g, world_generator, and WORLD::world_saves.
Referenced by quickload().
| void game::load_core_data | ( | loading_ui & | ui | ) |
Loads core dynamic data.
May throw.
Definition at line 446 of file game.cpp.
References DynamicDataLoader::get_instance(), PATH_INFO::jsondir(), load_data_from_dir(), and DynamicDataLoader::unload_data().
Referenced by check_mod_data(), dump_stats(), and setup().
|
protected |
Loads dynamic data from the given directory.
May throw.
Definition at line 455 of file game.cpp.
References DynamicDataLoader::get_instance(), and DynamicDataLoader::load_data_from_path().
Referenced by check_mod_data(), load_core_data(), and load_packs().
| void game::load_map | ( | const tripoint & | pos_sm, |
| bool | pump_events = false |
||
| ) |
Load the main map at given location, see map::load, in global, absolute submap coordinates.
| pump_events | If true, handle window events during loading. If you set this to true, do ensure that the map is not accessed before this function returns (for example, UIs that draw the map should be disabled). |
Definition at line 651 of file game.cpp.
References load_map().
Referenced by load_map(), place_player_overmap(), start_game(), and unserialize().
| void game::load_map | ( | const tripoint_abs_sm & | pos_sm, |
| bool | pump_events = false |
||
| ) |
Definition at line 657 of file game.cpp.
References grid_tracker_ptr, map::load(), and m.
|
private |
Definition at line 2613 of file game.cpp.
References get_world_base_save_path(), read_from_file_optional(), SAVE_MASTER(), and unserialize_master().
Referenced by load(), and start_game().
| void game::load_npcs | ( | ) |
Makes any nearby NPCs on the overmap active.
Definition at line 917 of file game.cpp.
References active_npc, add_msg(), get_levx(), get_levy(), get_levz(), overmapbuffer::get_npcs_near_player(), HALF_MAPSIZE, map::has_zlevels(), map::inbounds(), m, m_debug, MAPSIZE, npcs_dirty, npc::on_load(), overmap_buffer, tripoint::x, tripoint::y, and tripoint::z.
Referenced by do_turn(), perhaps_add_random_npc(), place_player_overmap(), reload_npcs(), save_cyborg(), spawn_hallucination(), start_game(), and update_map().
| bool game::load_packs | ( | const std::string & | msg, |
| const std::vector< mod_id > & | packs, | ||
| loading_ui & | ui | ||
| ) |
Load content packs.
| msg | string to display whilst loading prompt |
| packs | content packs to load in correct dependent order |
| ui | structure for load progress display |
Definition at line 2769 of file game.cpp.
References available, string_id< T >::c_str(), debugmsg, string_id< T >::is_valid(), load_data_from_dir(), and MOD_INFORMATION::name().
Referenced by dump_stats().
| void game::load_static_data | ( | ) |
Loads static data that does not depend on mods or similar.
Definition at line 331 of file game.cpp.
References fullscreen, get_auto_pickup(), get_distraction_manager(), DynamicDataLoader::get_instance(), panel_manager::get_manager(), get_safemode(), input_manager::init(), panel_manager::init(), inp_mngr, distraction_manager::distraction_manager_gui::load(), auto_pickup::player_settings::load_global(), safemode::load_global(), show_panel_adm, and was_fullscreen.
| void game::load_world_modfiles | ( | loading_ui & | ui | ) |
Loads core data and mods from the active world.
May throw.
Definition at line 2733 of file game.cpp.
References world_generator.
Referenced by setup().
| cata::optional< tripoint > game::look_around | ( | bool | force_3d = false | ) |
Definition at line 6713 of file game.cpp.
References center, look_around(), Character::pos(), tripoint_zero, u, and player::view_offset.
Referenced by handle_action(), list_monsters(), look_around(), peek(), and zones_manager().
| look_around_result game::look_around | ( | bool | show_window, |
| tripoint & | center, | ||
| const tripoint & | start_point, | ||
| bool | has_first_point, | ||
| bool | select_zone, | ||
| bool | peeking, | ||
| bool | is_moving_zone = false, |
||
| const tripoint & | end_point = tripoint_zero, |
||
| bool | force_3d = false |
||
| ) |
| show_window | display the info window that holds the tile information in the position. |
| center | used to calculate the u.view_offset, could center the screen to the position it represents |
| start_point | the start point of the targeting zone, also the initial local position of the cursor |
| has_first_point | should be true if the first point has been selected when editing the zone |
| select_zone | true if the zone is being edited |
| peeking | determines if the player is peeking |
| is_moving_zone | true if the zone is being moved, false by default |
| end_point | the end point of the targeting zone, only used if is_moving_zone is true, default is tripoint_zero |
Definition at line 6721 of file game.cpp.
References _, action, add_draw_callback(), add_msg(), map::build_map_cache(), bVMonsterLookFire, c_green, c_light_gray, c_light_green, c_white, center, center_print(), clamp(), create_zone_callback(), display_lighting(), display_radiation(), display_scent(), display_temperature(), display_transparency(), draw_border(), draw_look_around_cursor(), extended_description(), fov_3d_z_range, g, input_context::get_action_name(), input_context::get_coordinates(), panel_manager::get_current_layout(), input_context::get_desc(), input_context::get_direction(), get_levx(), get_levy(), get_levz(), panel_manager::get_manager(), Character::get_path_avoid(), Character::get_pathfinding_settings(), map::get_visibility_variables_cache(), panel_manager::get_width_left(), get_zoom(), catacurses::getmaxy(), input_context::handle_input(), map::has_zlevels(), invalidate_main_ui_adaptor(), map::invalidate_map_cache(), is_looking, MAP_SHARING::isCompetitive(), MAP_SHARING::isDebugger(), list_items_monsters(), m, m_debug, m_info, mark_main_ui_adaptor_resize(), mouse_edge_scrolling_terrain(), mvwprintz(), catacurses::newwin(), cata::nullopt, OVERMAP_DEPTH, OVERMAP_HEIGHT, PA_BLIND_THROW, pixel_minimap_option, Character::pos(), Character::posz(), pre_print_all_tile_info(), ui_manager::redraw(), reenter_fullscreen(), input_context::register_action(), input_context::register_directions(), input_context::reset_timeout(), right_print(), map::route(), Character::sees(), Character::set_destination(), input_context::set_iso(), input_context::set_timeout(), set_zoom(), square_dist(), string_format(), temp_exit_fullscreen(), TERMX, TERMY, tileset_zoom, toggle_debug_hour_timer(), toggle_pixel_minimap(), tripoint_zero, u, map::update_visibility_cache(), use_tiles, player::view_offset, w_pixel_minimap, w_terrain, catacurses::werase(), catacurses::wnoutrefresh(), tripoint::x, tripoint::y, tripoint::z, zoom_in(), and zoom_out().
| cata::optional< tripoint > game::look_debug | ( | ) |
| void game::mark_main_ui_adaptor_resize | ( | ) | const |
Definition at line 3147 of file game.cpp.
References main_ui_adaptor.
Referenced by handle_action(), look_around(), toggle_fullscreen(), and toggle_pixel_minimap().
| memorial_logger & game::memorial | ( | ) |
Definition at line 2889 of file game.cpp.
References memorial_logger_ptr.
Referenced by cleanup_at_end(), load(), save_player_data(), win(), win_screen(), and write_memorial_file().
| void game::mon_info | ( | const catacurses::window & | w, |
| int | hor_padding = 0 |
||
| ) |
Definition at line 3838 of file game.cpp.
References _, mtype::agro, c, c_dark_gray, c_light_gray, c_light_green, c_light_red, c_pink, c_red, c_white, mtype::color, detail::count(), monster_visible_info::dangerous, mtype::difficulty, avatar::get_mon_visible(), catacurses::getmaxx(), catacurses::getmaxy(), mvwprintz(), om_direction::name(), mtype::nname(), NPCATT_FOLLOW, NPCATT_KILL, pgettext(), string_format(), mtype::sym, type, u, monster_visible_info::unique_mons, monster_visible_info::unique_types, utf8_width(), point::x, and point::y.
| void game::mon_info_update | ( | ) |
Definition at line 3992 of file game.cpp.
References _, ABOVECENTER, ABOVEEAST, ABOVENORTH, ABOVENORTHEAST, ABOVENORTHWEST, ABOVESOUTH, ABOVESOUTHEAST, ABOVESOUTHWEST, ABOVEWEST, Creature::add_effect(), add_msg(), monster::attitude(), monster::attitude_to(), npc::attitude_to(), BELOWCENTER, BELOWEAST, BELOWNORTH, BELOWNORTHEAST, BELOWNORTHWEST, BELOWSOUTH, BELOWSOUTHEAST, BELOWSOUTHWEST, BELOWWEST, c, cancel_activity_or_ignore_query(), CENTER, safemode::check_monster(), monster_visible_info::dangerous, direction_from(), EAST, effect_adrenaline_mycus, safemode::empty(), detail::fill(), time_duration::from_turns(), g, npc::get_attitude(), Creature::get_effect_int(), avatar::get_mon_visible(), get_safemode(), Character::get_visible_creatures(), Creature::has_effect(), Character::has_trait(), hostile_spotted_far, monster::ignoring, mtype::in_species(), is_valid_in_w_terrain(), monster::lastseen_turn, m, m_info, m_warning, MAPSIZE_X, MATT_ATTACK, MATT_FOLLOW, MAX_VIEW_DISTANCE, player::mod_pain(), mostseen, monster::name(), monster_visible_info::new_seen_mon, NORTH, NORTHEAST, NORTHWEST, NPCATT_KILL, PLANT, Character::pos(), monster::pos(), POSX, POSY, rl_dist(), RULE_BLACKLISTED, RULE_NONE, safe_mode, SAFE_MODE_OFF, SAFE_MODE_ON, SAFE_MODE_STOP, Creature::sees(), set_safe_mode(), shared_from(), SOUTH, SOUTHEAST, SOUTHWEST, calendar::start_of_cataclysm, string_format(), calendar::turn, turnssincelastmon, monster::type, u, monster_visible_info::unique_mons, monster_visible_info::unique_types, player::view_offset, WEST, tripoint::x, tripoint::xy(), and tripoint::y.
Referenced by do_turn().
|
private |
Definition at line 4228 of file game.cpp.
References _, ACT_OPERATION, add_msg(), alert, all_monsters(), cancel_activity_or_ignore_query(), cleanup_dead(), map::creature_in_field(), dbg, debug_mode, debugmsg, despawn_monster(), effect_ai_controlled, effect_npc_suspend, effect_ridden, Error, g, Character::get_power_level(), Character::has_active_bionic(), Creature::has_effect(), map::impassable(), is_empty(), m, m_debug, m_warning, MAPSIZE_X, MAPSIZE_Y, MF_MILKABLE, Character::mod_power_level(), calendar::once_every(), map::points_in_radius(), Character::pos(), rl_dist(), string_format(), map::tername(), u, and avatar::wake_up().
Referenced by do_turn().
|
private |
Definition at line 2138 of file game.cpp.
References CATA_INPUT_MOUSE, CATA_INPUT_TIMEOUT, input_context::get_raw_input(), iso, last, last_mouse_edge_scroll, cata::hash64_detail::ret, tripoint_zero, point::x, and point::y.
Referenced by mouse_edge_scrolling_overmap(), and mouse_edge_scrolling_terrain().
| tripoint game::mouse_edge_scrolling_overmap | ( | input_context & | ctxt | ) |
This variant is suitable for the overmap.
Definition at line 2200 of file game.cpp.
References last_mouse_edge_scroll_vector_overmap, last_mouse_edge_scroll_vector_terrain, mouse_edge_scrolling(), cata::hash64_detail::ret, and tripoint_zero.
| tripoint game::mouse_edge_scrolling_terrain | ( | input_context & | ctxt | ) |
Used to implement mouse "edge scrolling".
Returns a tripoint which is a vector of the resulting "move", i.e. (0, 0, 0) if the mouse is not at the edge of the screen, otherwise some (x, y, 0) depending on which edges are hit. This variant adjust scrolling speed according to zoom level, making it suitable when viewing the "terrain".
Definition at line 2191 of file game.cpp.
References DEFAULT_TILESET_ZOOM, last_mouse_edge_scroll_vector_overmap, last_mouse_edge_scroll_vector_terrain, mouse_edge_scrolling(), cata::hash64_detail::ret, tile_iso, tileset_zoom, and tripoint_zero.
Referenced by look_around().
|
private |
Definition at line 2575 of file game.cpp.
References assure_dir_exist(), base64_encode(), debugmsg, get_files_from_path(), get_world_base_save_path(), PATH_INFO::graveyarddir(), Character::name, prefix, remove_file(), rename_file(), and u.
Referenced by cleanup_at_end().
| void game::moving_vehicle_dismount | ( | const tripoint & | dest_loc | ) |
Handles players exiting from moving vehicles.
Definition at line 5284 of file game.cpp.
References _, add_msg(), debugmsg, tileray::dir(), vehicle::face, fling_creature(), map::has_flag(), m, Creature::moves, vehicle::name, Character::pos(), Character::posx(), Character::posy(), u, map::unboard_vehicle(), map::veh_at(), vehicle::velocity, and tripoint::xy().
| float game::natural_light_level | ( | int | zlev | ) | const |
Definition at line 3657 of file game.cpp.
References default_daylight_level(), timed_event_manager::get(), get_weather, latest_lightlevels, left, LIGHT_AMBIENT_MINIMAL, weather_type::light_modifier, OVERMAP_HEIGHT, timed_event_manager::queued(), cata::hash64_detail::ret, sunlight(), TIMED_EVENT_ARTIFACT_LIGHT, TIMED_EVENT_DIM, timed_events, calendar::turn, and weather_manager::weather_id.
Referenced by light_level().
| bool game::npc_menu | ( | npc & | who | ) |
Returns true if the menu handled stuff and player shouldn't do anything else.
Perception slightly increases precision when examining NPCs' wounds Firstaid increases precision when examining NPCs' woundsDefinition at line 5415 of file game.cpp.
References _, add_msg(), uilist::addentry(), Character::body_window(), debug_mode, player::disarm(), Character::disp_name(), Character::get_skill_level(), Character::in_sleep_state(), avatar::invoke_item(), Character::is_armed(), npc::is_enemy(), Character::is_mounted(), npc::is_player_ally(), heal_actor::limb_power, m_warning, Character::melee_attack(), Creature::mod_moves(), npc::move_away_from(), Character::name, npc::on_attacked(), Character::per_cur, Character::pos(), prompt_dangerous_tile(), monexamine::push(), uilist::query(), query_yn(), uilist::ret, skill_firstaid, player::sort_armor(), game_menus::inv::steal(), avatar::steal(), string_format(), swap_critters(), swap_pos(), npc::talk_to_u(), uilist::text, game_menus::inv::titled_filter_menu(), u, and avatar_action::use_item().
Referenced by examine().
| size_t game::num_creatures | ( | ) | const |
Returns the approximate number of creatures in the reality bubble.
Because of performance restrictions it may return a slightly incorrect values (as it includes dead, but not yet cleaned up creatures).
Definition at line 4854 of file game.cpp.
References active_npc, and critter_tracker.
Referenced by display_visibility(), and fungal_effects::fungalize().
| void game::on_move_effects | ( | ) |
Definition at line 9851 of file game.cpp.
References Character::can_run(), CMM_RUN, sfx::do_ambient(), units::from_kilojoule(), item::fuel_energy(), Character::get_bionic_fueled_with(), Character::has_active_bionic(), Character::has_bionic(), Character::is_mounted(), Character::martial_arts_data, Character::mod_power_level(), Character::movement_mode_is(), avatar::toggle_run_mode(), and u.
Referenced by phasing_move(), and walk_move().
| void game::on_options_changed | ( | ) |
Should be invoked whenever options change.
Definition at line 9885 of file game.cpp.
References grid_tracker_ptr.
|
private |
Definition at line 1490 of file handle_action.cpp.
References _, game_menus::inv::consume_drink(), game_menus::inv::consume_food(), game_menus::inv::consume_meds(), avatar_action::eat(), uilist::entries, uilist::query(), uilist::ret, uilist::text, and u.
Referenced by handle_action().
|
private |
Definition at line 4353 of file game.cpp.
References add_msg(), overmap_path_params::for_npc(), overmapbuffer::get_npcs_near_player(), overmapbuffer::get_travel_path(), npc::is_active(), m_debug, npc::mission, npc::no_goal_point, NPC_MISSION_NULL, NPC_MISSION_TRAVELLING, Character::omt_path, overmap_buffer, Character::pos(), reload_npcs(), rl_dist(), SEEX, coords::coord_point< Point, Origin, Scale >::to_string(), and u.
Referenced by do_turn().
| void game::peek | ( | ) |
Definition at line 5775 of file game.cpp.
References _, choose_direction(), map::impassable(), look_around(), m, map::obstructed_by_vehicle_rotation(), peek(), Character::pos(), u, and vertical_move().
Referenced by handle_action(), and peek().
| void game::peek | ( | const tripoint & | p | ) |
Definition at line 5800 of file game.cpp.
References center, map::invalidate_map_cache(), look_around(), m, Creature::moves, PA_BLIND_THROW, avatar_action::plthrow(), Character::pos(), Character::setpos(), u, and tripoint::z.
|
private |
Definition at line 11182 of file game.cpp.
References faction_manager_ptr, get_levz(), overmapbuffer::get_npcs_near_player(), Character::global_omt_location(), map::has_zlevels(), faction_template::id, overmapbuffer::insert_npc(), is_river_or_lake(), load_npcs(), m, NPC_MISSION_NULL, omt_to_sm_copy(), calendar::once_every(), ORIGIN_ANY_NPC, overmap_buffer, mission::reserve_random(), rng(), overmapbuffer::ter(), u, x_in_y(), and tripoint::xy().
Referenced by do_turn().
| bool game::phasing_move | ( | const tripoint & | dest, |
| bool | via_ramp = false |
||
| ) |
Definition at line 9583 of file game.cpp.
References _, add_msg(), player::add_msg_if_player(), map::board_vehicle(), map::creature_on_trap(), critter_at(), Character::get_max_power_level(), Character::get_power_level(), avatar::grab(), Creature::has_effect_with_flag(), map::impassable(), Character::in_vehicle, m, m_info, Character::mod_power_level(), Creature::moves, OBJECT_NONE, on_move_effects(), Character::pos(), Character::posx(), Character::posy(), Character::posz(), Character::setpos(), sgn(), u, map::unboard_vehicle(), map::veh_at(), Character::worn_with_flag(), point::x, tripoint::x, point::y, tripoint::y, and tripoint::z.
|
private |
Definition at line 5746 of file game.cpp.
References _, ACTION_PICKUP, choose_adjacent_highlight(), and pickup().
Referenced by handle_action(), and pickup().
|
private |
Definition at line 5757 of file game.cpp.
References add_draw_callback(), map::drawsq(), m, pickup::pick_up(), and w_terrain.
|
private |
Definition at line 5768 of file game.cpp.
References pickup::pick_up(), Character::pos(), and u.
Referenced by handle_action().
Definition at line 4802 of file game.cpp.
References center, and place_critter_around().
Referenced by place_critter_around(), place_critter_at(), replace_stair_monsters(), and start_game().
| monster * game::place_critter_around | ( | const shared_ptr_fast< monster > & | mon, |
| const tripoint & | center, | ||
| int | radius, | ||
| bool | forced = false |
||
| ) |
Definition at line 4811 of file game.cpp.
References can_place_monster(), center, choose_where_to_place_monster(), critter_tracker, m, and map::points_in_radius().
Adds critters to the reality bubble, creating them if necessary.
Functions taking a id parameter will construct a monster based on that id, (with default properties). Functions taking a mon parameter will use the supplied monster instance instead (which must not be null). Note: the monster will not be upgraded by these functions, it is placed as is.
place_critter_at will place the creature exactly at the given point.
place_critter_around will place the creature around the center p within the given radius (radius 0 means only the center point is used). The chosen point will be as close to the center as possible.
place_critter_within will place the creature at a random point within that given range. (All points within have equal probability.)
mon). Definition at line 4792 of file game.cpp.
References place_critter_around().
Referenced by fungal_effects::fungalize(), revive_corpse(), fungal_effects::spread_fungus_one_tile(), and update_stair_monsters().
| monster * game::place_critter_at | ( | const shared_ptr_fast< monster > & | mon, |
| const tripoint & | p | ||
| ) |
Definition at line 4797 of file game.cpp.
References place_critter_around().
| monster * game::place_critter_within | ( | const mtype_id & | id, |
| const tripoint_range< tripoint > & | range | ||
| ) |
Definition at line 4834 of file game.cpp.
References place_critter_within().
Referenced by place_critter_within().
| monster * game::place_critter_within | ( | const shared_ptr_fast< monster > & | mon, |
| const tripoint_range< tripoint > & | range | ||
| ) |
Definition at line 4843 of file game.cpp.
References choose_where_to_place_monster(), and critter_tracker.
Definition at line 9221 of file game.cpp.
References _, ACTION_CONTROL_VEHICLE, Character::activity, Creature::add_effect(), add_msg(), Character::assign_activity(), player_activity::auto_resume, map::board_vehicle(), body_part_name_accusative(), bp_foot_l, bp_foot_r, bp_leg_l, bp_leg_r, map::can_put_items(), check_zone(), map::creature_in_field(), map::creature_on_trap(), Character::deal_damage(), Character::dex_cur, direction_XY(), Character::drench(), DT_CUT, EAST, effect_bouldering, effect_no_sight, effect_onfire, effect_ridden, effect_riding, item_stack::empty(), map_data_common_t::examine, map::furn(), map::furnname(), Character::get_armor_bash(), optional_vpart_position::get_label(), get_levz(), Creature::get_random_body_part(), map::get_signage(), map::getabs(), map::graffiti_at(), iexamine::harvest_furn(), iexamine::harvest_furn_nectar(), iexamine::harvest_ter(), iexamine::harvest_ter_nectar(), Creature::has_effect(), map::has_flag(), map::has_flag_ter(), map::has_flag_ter_or_furn(), map::has_graffiti_at(), map::has_items(), Character::has_trait(), map::has_zlevels(), map::i_at(), Character::in_vehicle, calendar::INDEFINITELY_LONG, Character::is_blind(), is_empty(), Character::is_hauling(), Character::is_mounted(), m, m_bad, m_info, visitable< T >::max_quality(), mostseen, Character::mounted_creature, monster::move_to(), monster::name(), Name::names, iexamine::none(), NORTH, NORTHEAST, NORTHWEST, num_bp, int_id< T >::obj(), one_in(), optional_vpart_position::part_with_feature(), pickup::pick_up(), player_activity::placement, map::points_in_radius(), Character::pos(), monster::pos(), press_x(), monster::process_triggers(), random_entry(), Creature::remove_effect(), rng(), player::search_surroundings(), Character::setpos(), monster::setpos(), iexamine::shrub_marloss(), iexamine::shrub_wildveggies(), SOUTH, SOUTHEAST, SOUTHWEST, Character::stop_hauling(), player_activity::str_values, string_format(), player_activity::targets, map::ter(), map::tername(), TFLAG_DEEP_WATER, TFLAG_NO_SIGHT, trait_ILLITERATE, trait_PARKOUR, trait_THICKSKIN, iexamine::tree_marloss(), u, map::unboard_vehicle(), update_map(), map::veh_at(), vertical_shift(), vgettext(), WEST, x_in_y(), tripoint::xy(), and tripoint::z.
Referenced by place_player_overmap(), and walk_move().
| void game::place_player_overmap | ( | const tripoint_abs_omt & | om_dest | ) |
Definition at line 9544 of file game.cpp.
References map::access_cache(), all_monsters(), map::clear_vehicle_cache(), map::clear_vehicle_list(), despawn_monster(), effect_ridden, effect_riding, get_levz(), get_weather, HALF_MAPSIZE, map::has_zlevels(), Character::in_vehicle, Character::is_mounted(), load_map(), load_npcs(), m, level_cache::map_memory_seen_cache, Character::mounted_creature, weather_manager::nextweather, OVERMAP_DEPTH, OVERMAP_HEIGHT, place_player(), Character::pos(), Creature::remove_effect(), map::spawn_monsters(), calendar::turn, u, map::unboard_vehicle(), unload_npcs(), update_overmap_seen(), tripoint::xy(), and tripoint::z.
|
private |
Definition at line 866 of file game.cpp.
References map::add_vehicle(), overmapbuffer::add_vehicle(), vehicle::can_float(), omt_find_params::cant_see, overmapbuffer::find_all(), map::getabs(), map::getlocal(), map::load(), m, omt_find_params::min_distance, ms_to_sm_remain(), omt_find_params::must_see, overmap_buffer, vehicle::pos, random_entry(), rng(), map::save(), omt_find_params::search_range, SEEX, SEEY, vehicle::sm_pos, vehicle::tracking_on, type, omt_find_params::types, and tripoint::xy().
Referenced by start_game().
| void game::pre_print_all_tile_info | ( | const tripoint & | lp, |
| const catacurses::window & | w_info, | ||
| int & | line, | ||
| int | last_line, | ||
| const visibility_variables & | cache | ||
| ) |
Definition at line 6700 of file game.cpp.
References oter_t::get_name(), map::getabs(), m, ms_to_omt_copy(), overmap_buffer, print_all_tile_info(), and overmapbuffer::ter().
Referenced by look_around().
| void game::print_all_tile_info | ( | const tripoint & | lp, |
| const catacurses::window & | w_look, | ||
| const std::string & | area_name, | ||
| int | column, | ||
| int & | line, | ||
| int | last_line, | ||
| const visibility_variables & | cache | ||
| ) |
Definition at line 5878 of file game.cpp.
References _, map::apparent_light_at(), creature, critter_at(), map::get_visibility(), map::inbounds(), line(), m, catacurses::mvwprintw(), OVERMAP_DEPTH, OVERMAP_HEIGHT, print_creature_info(), print_fields_info(), print_graffiti_info(), print_items_info(), print_terrain_info(), print_trap_info(), print_vehicle_info(), print_visibility_info(), Character::sees_with_infrared(), Character::sees_with_specials(), sounds::sound_at(), u, map::veh_at(), veh_pointer_or_null(), VIS_BOOMER, VIS_BOOMER_DARK, VIS_CLEAR, VIS_DARK, VIS_HIDDEN, VIS_LIT, and tripoint::z.
Referenced by pre_print_all_tile_info().
|
private |
Definition at line 6086 of file game.cpp.
References creature, line(), Character::sees(), and u.
Referenced by print_all_tile_info().
|
private |
Definition at line 6048 of file game.cpp.
References field_entry::color(), map::field_at(), fold_and_print(), get_fire_fuel_string(), catacurses::getmaxx(), map::has_flag(), line(), m, mvwprintz(), field_entry::name(), t_pit, t_pit_shallow, map::ter(), and TFLAG_FIRE_CONTAINER.
Referenced by print_all_tile_info().
|
private |
Definition at line 6142 of file game.cpp.
References _, c_light_gray, fold_and_print(), catacurses::getmaxx(), map::graffiti_at(), map::has_graffiti_at(), line(), m, t_grave_new, and map::ter().
Referenced by print_all_tile_info().
|
private |
Definition at line 6104 of file game.cpp.
References _, c_white, c_yellow, map::could_see_items(), effect_blind, catacurses::getmaxx(), Creature::has_effect(), map::has_flag(), map::i_at(), line(), m, catacurses::mvwprintw(), mvwprintz(), pgettext(), map::sees_some_items(), item::tname(), trim_and_print(), u, and Character::worn_with_flag().
Referenced by print_all_tile_info().
|
private |
Definition at line 5975 of file game.cpp.
References _, map::ambient_light_at(), c_dark_gray, c_light_gray, map::coverage(), debug_mode, map::features(), fold_and_print(), map::furn(), map::furnname(), get_light_level(), get_map, map::get_signage(), catacurses::getmaxx(), map::has_floor(), map::has_floor_or_support(), map::has_furn(), Character::has_trait(), map::has_zlevels(), ter_t::id, furn_t::id, map::impassable(), LIGHT_AMBIENT_LIT, line(), m, map::move_cost(), catacurses::mvwprintw(), OVERMAP_DEPTH, cata::hash64_detail::ret, string_id< T >::str(), string_format(), map::ter(), map::tername(), tripoint::to_string(), trait_ILLITERATE, trim_and_print(), u, wprintz(), tripoint::xy(), and tripoint::z.
Referenced by print_all_tile_info().
|
private |
Definition at line 6066 of file game.cpp.
References _, trap::can_see(), trap::color, partial_con::counter, construction::group, partial_con::id, line(), trap::loadid, m, mvwprintz(), construction_group::name(), trap::name(), int_id< T >::obj(), map::partial_con_at(), string_format(), map::tr_at(), tr_unfinished_construction, and u.
Referenced by print_all_tile_info().
|
private |
Definition at line 6095 of file game.cpp.
References _, catacurses::getmaxx(), line(), catacurses::mvwprintw(), vehicle::name, and vehicle::print_part_list().
Referenced by print_all_tile_info().
|
private |
Definition at line 5946 of file game.cpp.
References _, line(), catacurses::mvwprintw(), VIS_BOOMER, VIS_BOOMER_DARK, VIS_CLEAR, VIS_DARK, VIS_HIDDEN, and VIS_LIT.
Referenced by print_all_tile_info().
|
private |
Definition at line 1762 of file game.cpp.
References Character::activity, player_activity::do_turn(), Creature::moves, and u.
Referenced by do_turn().
Definition at line 11456 of file game.cpp.
References _, Creature::add_effect(), map::add_field(), Character::add_morale(), add_msg(), AEP_ALL_DOWN, AEP_ALL_UP, AEP_DEX_DOWN, AEP_DEX_UP, AEP_EVIL, AEP_EXTINGUISH, AEP_FUN, AEP_HUNGER, AEP_INT_DOWN, AEP_INT_UP, AEP_PBLUE, AEP_PER_DOWN, AEP_PER_UP, AEP_RADIOACTIVE, AEP_SCHIZO, AEP_SMOKE, AEP_SNAKES, AEP_SPEED_DOWN, AEP_SPEED_UP, AEP_STR_DOWN, AEP_STR_UP, AEP_THIRST, item::ammo_capacity(), item::ammo_remaining(), ARTC_FATIGUE, ARTC_HP, ARTC_NULL, ARTC_PAIN, ARTC_PORTAL, ARTC_SOLAR, ARTC_TIME, itype::artifact, item::charges, check_art_charge_req(), Character::dex_cur, effect_evil, fd_fatigue, fd_fire, fd_smoke, Character::get_dex(), Character::get_int(), Character::get_per(), Character::get_rad(), Character::get_str(), Character::hurtall(), Character::int_cur, Character::irradiate(), item::is_armor(), is_in_sunlight(), item::is_tool(), Character::is_worn(), trap::loadid, m, m_bad, m_good, Character::mod_dex_bonus(), Character::mod_fatigue(), map::mod_field_age(), Character::mod_int_bonus(), Creature::mod_pain_noresist(), Character::mod_per_bonus(), Character::mod_rad(), Character::mod_stamina(), Character::mod_stored_kcal(), Character::mod_str_bonus(), Character::mod_thirst(), MORALE_FEELING_GOOD, NUM_ARTCS, calendar::once_every(), one_in(), Character::per_cur, map::points_in_radius(), Character::pos(), Character::posx(), Character::posy(), Character::posz(), map::remove_field(), map::remove_trap(), rng(), Character::str_cur, item::tname(), map::tr_at(), tr_portal, item::type, u, and Character::weapon.
|
private |
Definition at line 1722 of file game.cpp.
References _, Character::activity, cancel_activity_or_ignore_query(), effect_sleep, Creature::get_name(), handle_key_blocking_activity(), Character::has_activity(), Character::has_destination(), Creature::has_effect(), hostile_spotted_near, player_activity::is_distraction_ignored(), is_hostile_very_close(), player_activity::moves_left, Character::omt_path, string_format(), and u.
Referenced by do_turn().
| bool game::prompt_dangerous_tile | ( | const tripoint & | dest_loc | ) | const |
Definition at line 8833 of file game.cpp.
References _, add_msg(), enumerate_as_string(), get_dangerous_tile(), Character::is_mounted(), trap::loadid, m, m_warning, Character::mounted_creature, query_yn(), map::tr_at(), tr_ledge, and u.
Referenced by npc_menu(), and walk_move().
|
private |
Definition at line 11424 of file game.cpp.
References _, overmapbuffer::clear(), debugmsg, save_t::from_player_name(), load(), MAPBUFFER, moves_since_last_save, Character::name, overmap_buffer, popup_getkey(), mapbuffer::reset(), WORLD::save_exists(), setup(), u, and world_generator.
Referenced by handle_action().
| void game::quicksave | ( | ) |
Definition at line 11402 of file game.cpp.
References _, add_msg(), last_save_timestamp, m_info, moves_since_last_save, popup(), ui_manager::redraw(), refresh_display(), and save().
Referenced by autosave(), and handle_action().
| void game::reenter_fullscreen | ( | ) |
Definition at line 565 of file game.cpp.
References fullscreen, toggle_fullscreen(), and was_fullscreen.
Referenced by list_items_monsters(), and look_around().
| void game::reload_npcs | ( | ) |
Unloads, then loads the NPCs.
Definition at line 979 of file game.cpp.
References load_npcs(), and unload_npcs().
Referenced by load(), overmap_npc_move(), vertical_move(), and vertical_shift().
| void game::reload_tileset | ( | ) |
Definition at line 529 of file game.cpp.
References _, g, popup(), and world_generator.
Referenced by handle_action().
| vehicle * game::remoteveh | ( | ) |
Returns the current remotely controlled vehicle.
Definition at line 2360 of file game.cpp.
References bio_remote, vehicle::fuel_left(), Creature::get_value(), Character::has_active_bionic(), Character::has_active_item(), itype_battery, itype_remotevehcontrol, m, remoteveh_cache, remoteveh_cache_time, calendar::turn, u, map::veh_at(), veh_pointer_or_null(), tripoint::x, tripoint::y, and tripoint::z.
Referenced by control_vehicle(), and handle_action().
| void game::remove_npc_follower | ( | const character_id & | id | ) |
Remove follower id from follower set.
Definition at line 1992 of file game.cpp.
References follower_ids, player::follower_ids, and u.
Referenced by cleanup_dead().
| void game::remove_zombie | ( | const monster & | critter | ) |
Definition at line 4864 of file game.cpp.
References critter_tracker.
Referenced by despawn_monster(), disable_robot(), start_game(), and vertical_move().
|
private |
Definition at line 10922 of file game.cpp.
References coming_to_stairs, get_levz(), and place_critter_around().
|
private |
Definition at line 7297 of file game.cpp.
References _, c_light_gray, c_light_green, c_white, catacurses::getmaxx(), LINE_OOXX, LINE_OXOX, LINE_OXXO, LINE_XOXO, LINE_XOXX, LINE_XXXO, mvwprintz(), mvwputch(), point_zero, sFilter, shortcut_print(), TERMX, TERMY, utf8_width(), wprintz(), and point::x.
Referenced by list_items().
| void game::reset_light_level | ( | ) |
|
private |
Definition at line 2798 of file game.cpp.
References npc::add_new_mission(), npc_opinion::anger, npc::chatbin, npc_opinion::fear, overmapbuffer::find_npc(), follower_ids, Character::getID(), Character::global_omt_location(), npc::mission, npc_chatbin::mission_selected, npc_chatbin::missions, npc_chatbin::missions_assigned, NPC_MISSION_NULL, NPCATT_NULL, npc::op_of_u, ORIGIN_ANY_NPC, overmap_buffer, npc_opinion::owed, mission::reserve_random(), npc::set_attitude(), npc::set_fac(), npc_opinion::trust, and npc_opinion::value.
Referenced by cleanup_at_end().
| void game::reset_zoom | ( | ) |
Revives a corpse at given location.
The monster type and some of its properties are deducted from the corpse. If reviving succeeds, the location is guaranteed to have a new monster there (see critter_at).
| p | The place where to put the revived monster. |
| it | The corpse item, it must be a valid corpse (see item::is_corpse). |
Definition at line 4995 of file game.cpp.
References monster::add_effect(), monster::ammo, item::components, monster::corpse_components, debugmsg, effect_downed, effect_pacified, effect_pet, monster::get_hp(), item::get_mtype(), item::get_var(), item::has_flag(), mtype::id, monster::init_from_item(), item::is_corpse(), monster::no_extra_death_drops, num_bp, and place_critter_at().
| bool game::save | ( | ) |
Returns false if saving failed.
Definition at line 2899 of file game.cpp.
References _, behavior::failure, save_t::from_player_name(), get_auto_notes_settings(), get_auto_pickup(), get_safemode(), get_world_base_save_path(), Character::name, popup(), save(), save_artifacts(), save_factions_missions_npcs(), save_maps(), save_player_data(), uistatedata::serialize(), u, uistate, world_generator, and write_to_file().
Referenced by handle_action(), quicksave(), and save().
|
private |
Definition at line 2834 of file game.cpp.
References get_world_base_save_path(), SAVE_ARTIFACTS(), and save_artifacts().
Referenced by cleanup_at_end(), and save().
Turns Broken Cyborg monster into Cyborg NPC via surgery.
Definition at line 5056 of file game.cpp.
References _, add_msg(), bionic_manip_cos(), Character::bionics_adjusted_skill(), item::damage(), item::damage_level(), delete_cyborg_item(), effect_assisted, effect_downed, g, Creature::get_effect_int(), get_levx(), get_levy(), overmapbuffer::insert_npc(), load_npcs(), m_bad, m_good, m_info, num_bp, overmap_buffer, popup(), rng(), item::set_damage(), skill_computer, skill_electronics, skill_firstaid, and behavior::success.
|
private |
Definition at line 2826 of file game.cpp.
References _, get_world_base_save_path(), SAVE_MASTER(), serialize_master(), and write_to_file().
Referenced by cleanup_at_end(), and save().
|
private |
Definition at line 2840 of file game.cpp.
References _, m, MAPBUFFER, overmap_buffer, popup(), map::save(), overmapbuffer::save(), and mapbuffer::save().
Referenced by cleanup_at_end(), and save().
|
private |
Definition at line 2853 of file game.cpp.
References _, memorial_logger::dump(), avatar::get_avatar_diary(), get_player_base_save_path(), memorial(), SAVE_EXTENSION(), SAVE_EXTENSION_LOG(), SAVE_EXTENSION_SHORTCUTS(), avatar::save_map_memory(), serialize(), diary::store(), u, and write_to_file().
Referenced by save().
| void game::serialize | ( | std::ostream & | fout | ) |
Saving and loading functions.
Definition at line 69 of file savegame.cpp.
References calendar_config::_initial_season, calendar_config::_start_of_cataclysm, calendar_config::_start_of_game, achievements_tracker_ptr, auto_travel_mode, coming_to_stairs, calendar::config, critter_tracker, JsonOut::end_object(), map::get_abs_sub(), kill_tracker_ptr, m, JsonOut::member(), mostseen, safe_mode, savegame_version, scent, scent_map::serialize(), Messages::serialize(), sm_to_om_remain(), JsonOut::start_object(), stats_tracker_ptr, token_provider_ptr, calendar::turn, u, point::x, tripoint::x, point::y, tripoint::y, and tripoint::z.
Referenced by save_player_data().
|
private |
Definition at line 1243 of file savegame.cpp.
References JsonError::c_str(), debugmsg, JsonOut::end_object(), faction_manager_ptr, get_weather, JsonOut::member(), next_mission_id, next_npc_id, SAVE_MASTER(), savegame_version, seed, mission::serialize_all(), and JsonOut::start_object().
Referenced by save_factions_missions_npcs().
| void game::set_critter_died | ( | ) |
If invoked, dead will be cleaned this turn.
Definition at line 1900 of file game.cpp.
References critter_died.
| void game::set_driving_view_offset | ( | const point & | p | ) |
Definition at line 1710 of file game.cpp.
References driving_view_offset, u, player::view_offset, point::x, tripoint::x, point::y, and tripoint::y.
Referenced by calc_driving_offset(), and cleanup_at_end().
| void game::set_npcs_dirty | ( | ) |
If invoked, NPCs will be reloaded before next turn.
Definition at line 1895 of file game.cpp.
References npcs_dirty.
| void game::set_safe_mode | ( | safe_mode_type | mode | ) |
Definition at line 8760 of file game.cpp.
References safe_mode, and safe_mode_warning_logged.
Referenced by handle_action(), and mon_info_update().
| void game::set_zoom | ( | int | level | ) |
| void game::setremoteveh | ( | vehicle * | veh | ) |
Sets the current remotely controlled vehicle.
Definition at line 2383 of file game.cpp.
References bio_remote, debugmsg, vehicle::global_pos3(), Character::has_active_bionic(), Character::has_active_item(), itype_remotevehcontrol, remoteveh_cache, remoteveh_cache_time, Creature::remove_value(), Creature::set_value(), calendar::turn, u, tripoint::x, tripoint::y, and tripoint::z.
| void game::setup | ( | ) |
Definition at line 577 of file game.cpp.
References _, achievements_tracker_ptr, active_npc, calendar::before_time_starts, bVMonsterLookFire, character_id, explosion_handler::explosion_queue::clear(), stats_tracker::clear(), mission::clear_all(), Messages::clear_messages(), clear_zombies(), coming_to_stairs, debugmsg, faction_manager_ptr, follower_ids, explosion_handler::get_explosion_queue(), get_weather, kill_tracker_ptr, load_core_data(), load_world_modfiles(), m, new_game, next_mission_id, next_npc_id, weather_manager::nextweather, string_id< weather_type >::NULL_ID(), popup(), QUIT_NO, ui_manager::redraw(), refresh_display(), remoteveh_cache, remoteveh_cache_time, scent_map::reset(), sounds::reset_sounds(), scent, SCT, calendar::set_eternal_season(), calendar::set_season_length(), stats(), timed_events, token_provider_ptr, turnssincelastmon, uquit, scrollingcombattext::vSCT, and weather_manager::weather_id.
Referenced by butcher_submenu(), and quickload().
| template shared_ptr_fast< npc > game::shared_from< npc > | ( | const T & | critter | ) |
Returns a shared pointer to the given critter (which can be of any of the subclasses of Creature).
The function may return an empty pointer if the given critter is not stored anywhere (e.g. it was allocated on the stack, not stored in the critter_tracker nor in active_npc nor is it u).
Definition at line 4722 of file game.cpp.
References active_npc, critter_tracker, u, and u_shared_ptr.
Referenced by list_monsters(), mon_info_update(), and validate_mounted_npcs().
| void game::shift_destination_preview | ( | const point & | delta | ) |
Definition at line 12152 of file game.cpp.
References destination_preview.
|
private |
Shift all active monsters, the shift vector is the number of shifted submaps.
Monsters that are outside of the reality bubble after shifting are despawned. Note on z-levels: this works with vertical shifts, but currently all monsters are despawned upon a vertical shift.
Definition at line 11157 of file game.cpp.
References all_monsters(), critter_tracker, despawn_monster(), map::has_zlevels(), map::inbounds(), m, point_zero, tripoint_zero, tripoint::xy(), and tripoint::z.
Referenced by update_map(), vertical_move(), and vertical_shift().
| bool game::slip_down | ( | ) |
Checks if player is able to successfully climb to/from some terrain and not slip down.
Definition at line 12159 of file game.cpp.
References _, add_msg(), Character::dex_cur, Character::has_trait(), m_bad, one_in(), trait_BADKNEES, and u.
| bool game::spawn_hallucination | ( | const tripoint & | p | ) |
Spawns a hallucination at a determined position.
Attempts to spawn a hallucination at given location.
Returns false if the hallucination couldn't be spawned for whatever reason, such as a monster already in the target square.
Definition at line 4880 of file game.cpp.
References critter_at(), critter_tracker, MonsterGenerator::generator(), get_levx(), get_levy(), MonsterGenerator::get_valid_hallucination(), overmapbuffer::insert_npc(), load_npcs(), NC_HALLU, one_in(), and overmap_buffer.
| spell_events & game::spell_events_subscriber | ( | ) |
Definition at line 2894 of file game.cpp.
References spell_events_ptr.
| void game::start_calendar | ( | ) |
Definition at line 11721 of file game.cpp.
References calendar_config::_initial_season, calendar_config::_start_of_cataclysm, calendar_config::_start_of_game, AUTUMN, calendar::config, debugmsg, scenario::has_flag(), rng(), scen, calendar_config::season_length(), SPRING, SUMMER, calendar::turn, calendar::turn_zero, and WINTER.
Referenced by start_game().
|
private |
Definition at line 665 of file game.cpp.
References _, Creature::add_effect(), start_location::add_map_extra(), Character::add_morale(), add_msg(), all_monsters(), mission::assign(), assign_npc_id(), calendar::before_time_starts, item_stack::begin(), map::build_map_cache(), start_location::burn(), character_id, auto_notes::auto_note_settings::clear(), overmapbuffer::clear(), auto_pickup::player_settings::clear_character_rules(), safemode::clear_character_rules(), map::clear_path(), create_starting_npcs(), critter_tracker, debugmsg, auto_notes::auto_note_settings::default_initialize(), Character::drench_mut_calc(), effect_accumulated_mutagen, effect_drunk, effect_flu, effect_infected, effect_pet, item_stack::end(), vehicle_stack::erase(), start_location::find_player_initial_location(), g, game_start, gamemode, get_auto_notes_settings(), get_auto_pickup(), get_cur_om(), get_distraction_manager(), get_levz(), scenario::get_map_extra(), get_safemode(), Character::get_stamina_max(), map::get_vehicles(), get_weather, Character::getID(), Character::global_omt_location(), HALF_MAPSIZE, start_location::handle_heli_crash(), scenario::has_flag(), scenario::has_map_extra(), init_autosave(), Character::inv_dump(), overmap::invalid_tripoint, map::invalidate_map_cache(), Character::last_climate_control_ret, distraction_manager::distraction_manager_gui::load(), safemode::load_global(), load_map(), load_master(), load_npcs(), m, m_debug, MAPBUFFER, scenario::missions(), MORALE_FEELING_BAD, mostseen, Creature::moves, om_direction::name(), new_game, Character::next_climate_control_check, weather_manager::nextweather, om_direction::north, num_bp, string_id< T >::obj(), overmap_buffer, OVERMAP_DEPTH, OVERMAP_HEIGHT, place_critter_around(), start_location::place_player(), overmap::place_special_forced(), place_vehicle_nearby(), popup(), Character::pos(), start_location::prepare_map(), player::process_turn(), query_yn(), random_body_part(), player::random_start_location, scenario::random_start_location(), ui_manager::redraw(), refresh_display(), remove_zombie(), mission::reserve_new(), mapbuffer::reset(), overmapbuffer::reveal(), rl_dist(), rng_bits(), safe_mode, SAFE_MODE_OFF, SAFE_MODE_ON, scen, overmap_ui::search(), seed, Character::set_highest_cat_level(), Character::set_stamina(), Character::setID(), Character::setpos(), map::spawn_monsters(), SPRING_TEMPERATURE, start_calendar(), player::start_location, player::starting_pets, player::starting_vehicle, behavior::success, start_location::surround_with_monsters(), weather_manager::temperature, calendar::turn, u, update_map(), weather_manager::update_weather(), VPFLAG_CONTROLS, tripoint::x, coords::coord_point< Point, Origin, Scale >::xy(), and tripoint::y.
| void game::start_hauling | ( | const tripoint & | pos | ) |
Definition at line 10520 of file game.cpp.
References Character::assign_activity(), map::i_at(), LIQUID, m, and u.
Referenced by vertical_move(), and walk_move().
| stats_tracker & game::stats | ( | ) |
Definition at line 2884 of file game.cpp.
References stats_tracker_ptr.
Referenced by death_screen(), handle_action(), setup(), and win().
Swaps positions of two creatures.
Definition at line 4909 of file game.cpp.
References a, b, map::board_vehicle(), critter_at(), critter_tracker, debugmsg, Character::in_vehicle, Creature::is_monster(), Creature::is_player(), m, optional_vpart_position::part_with_feature(), Creature::pos(), Character::pos(), second, Creature::setpos(), map::unboard_vehicle(), map::veh_at(), VPFLAG_BOARDABLE, and walk_move().
Referenced by npc_menu().
| bool game::take_screenshot | ( | ) | const |
Saves a screenshot of the current viewport, as a PNG file.
Filesystem location is derived from the current world and character.
false). A window (more precisely, a viewport) must already exist and the SDL renderer must be valid. true if the screenshot generation was successful, false otherwise. Definition at line 7289 of file game.cpp.
Referenced by do_turn().
| bool game::take_screenshot | ( | const std::string & | file_path | ) | const |
Saves a screenshot of the current viewport, as a PNG file, to the given location.
| file_path | A full path to the file where the screenshot should be saved. |
false). A window (more precisely, a viewport) must already exist and the SDL renderer must be valid. true if the screenshot generation was successful, false otherwise. Definition at line 7283 of file game.cpp.
| void game::temp_exit_fullscreen | ( | ) |
Definition at line 555 of file game.cpp.
References fullscreen, toggle_fullscreen(), and was_fullscreen.
Referenced by list_items_monsters(), and look_around().
| void game::toggle_debug_hour_timer | ( | ) |
Definition at line 11328 of file game.cpp.
References game::debug_hour_timer::toggle().
Referenced by handle_action(), and look_around().
| void game::toggle_fullscreen | ( | ) |
Definition at line 508 of file game.cpp.
References fullscreen, and mark_main_ui_adaptor_resize().
Referenced by handle_action(), reenter_fullscreen(), and temp_exit_fullscreen().
| void game::toggle_gate | ( | const tripoint & | p | ) |
Definition at line 5279 of file game.cpp.
References gates::toggle_gate(), and u.
| void game::toggle_pixel_minimap | ( | ) |
Definition at line 518 of file game.cpp.
References mark_main_ui_adaptor_resize(), pixel_minimap_option, and w_pixel_minimap.
Referenced by handle_action(), and look_around().
Definition at line 2404 of file game.cpp.
References act, ACTION_NULL, Character::clear_destination(), destination_preview, Character::get_next_auto_move_direction(), Character::get_path_avoid(), Character::get_pathfinding_settings(), m, Character::pos(), map::route(), Character::set_destination(), u, tripoint::x, and tripoint::y.
Referenced by handle_action().
Definition at line 2432 of file game.cpp.
References _, act, ACTION_CLOSE, ACTION_EXAMINE, ACTION_FIRE, ACTION_PICKUP, add_msg(), Character::clear_destination(), map::close_door(), destination_preview, is_adjacent(), item::is_gun(), map::is_outside(), m, m_info, Character::pos(), Character::posx(), Character::posy(), Character::posz(), Character::sees(), square_dist(), u, Character::weapon, and tripoint::xy().
Referenced by handle_action().
|
private |
Unloads all NPCs.
If you call this you must later call load_npcs, lest caches get rather confused. The tests used to call this a lot when they shouldn't. It is now private to reduce the chance of similar problems in the future.
Definition at line 970 of file game.cpp.
References active_npc, and npc::on_unload().
Referenced by place_player_overmap(), and reload_npcs().
| void game::unserialize | ( | std::istream & | fin | ) |
Definition at line 167 of file savegame.cpp.
References calendar_config::_initial_season, calendar_config::_start_of_cataclysm, calendar_config::_start_of_game, achievements_tracker_ptr, auto_travel_mode, JsonError::c_str(), chkversion(), coming_to_stairs, calendar::config, critter_tracker, debugmsg, Messages::deserialize(), scent_map::deserialize(), time_duration::from_turns(), JsonObject::get_array(), JsonObject::get_int(), JsonIn::get_object(), JsonObject::get_object(), JsonObject::has_object(), inp_mngr, kill_tracker_ptr, load_map(), mapgen_defer::member, mostseen, mtype_id, OMAPX, OMAPY, input_manager::pump_events(), JsonObject::read(), scent_map::reset(), safe_mode, SAFE_MODE_OFF, SAFE_MODE_ON, savegame_loading_version, scent, SPRING, stats_tracker_ptr, token_provider_ptr, calendar::turn, calendar::turn_zero, u, point::x, tripoint::x, point::y, tripoint::y, and tripoint::z.
Referenced by load().
| void game::unserialize_master | ( | std::istream & | fin | ) |
Definition at line 1193 of file savegame.cpp.
References _, JsonError::c_str(), chkversion(), debugmsg, character_id::deserialize(), JsonIn::end_object(), faction_manager_ptr, JsonIn::get_int(), JsonIn::get_member_name(), JsonIn::get_object(), get_weather, om_direction::name(), next_mission_id, next_npc_id, popup(), JsonIn::read(), JsonObject::read(), ui_manager::redraw(), refresh_display(), SAVE_MASTER(), savegame_loading_version, savegame_version, seed, JsonIn::skip_value(), JsonIn::start_object(), and mission::unserialize_all().
Referenced by load_master().
| point game::update_map | ( | int & | x, |
| int & | y | ||
| ) |
Definition at line 10788 of file game.cpp.
References active_npc, map::build_map_cache(), clamp(), get_levz(), grid_tracker_ptr, HALF_MAPSIZE_X, HALF_MAPSIZE_Y, map::has_zlevels(), map::invalidate_map_cache(), load_npcs(), m, MAPSIZE, OVERMAP_DEPTH, OVERMAP_HEIGHT, point_zero, scent, SEEX, SEEY, Character::setpos(), map::shift(), scent_map::shift(), Character::shift_destination(), shift_monsters(), sm_to_ms_copy(), map::spawn_monsters(), u, update_overmap_seen(), point::x, and point::y.
Definition at line 10782 of file game.cpp.
References Character::posx(), Character::posy(), update_map(), point::x, and point::y.
Referenced by fling_creature(), load(), place_player(), start_game(), update_map(), and vertical_move().
| void game::update_overmap_seen | ( | ) |
Definition at line 10883 of file game.cpp.
References oter_t::get_see_cost(), Character::global_omt_location(), light_level(), line(), line_to(), overmap_buffer, Character::overmap_sight_range(), points_in_radius(), Character::posz(), coords::coord_point< Point, Origin, Scale >::raw(), overmapbuffer::set_seen(), overmapbuffer::ter(), trigdist, u, coords::coord_point< Point, Origin, Scale >::x(), point::x, coords::coord_point< Point, Origin, Scale >::xy(), coords::coord_point< Point, Origin, Scale >::y(), point::y, and coords::coord_point< Point, Origin, Scale >::z().
Referenced by place_player_overmap(), and update_map().
|
private |
Definition at line 10935 of file game.cpp.
References _, Creature::add_effect(), add_msg(), monster::can_move_to(), coming_to_stairs, critter_at(), debugmsg, effect_downed, g, Character::get_dodge(), get_levz(), map::has_flag(), Character::has_trait(), map::has_zlevels(), is_empty(), Character::is_throw_immune(), m, m_neutral, m_warning, MAPSIZE_X, MAPSIZE_Y, monster::melee_attack(), monstairz, sounds::movement, Creature::moves, monster::name(), one_in(), other, place_critter_at(), point_north_west, map::points_on_zlevel(), Character::pos(), Character::posx(), monster::posx(), Character::posy(), monster::posy(), Character::posz(), monexamine::push(), random_entry_ref(), rl_dist(), rng(), Character::sees(), Character::setx(), Character::sety(), sounds::sound(), monster::spawn(), monster::staircount, string_format(), map::tername(), mattack::thrown_by_judo(), trait_LEG_TENT_BRACE, u, point::x, and point::y.
Referenced by do_turn(), and vertical_move().
Redirects to the creature_tracker update_pos() function.
Definition at line 4859 of file game.cpp.
References critter_tracker.
| void game::use_computer | ( | const tripoint & | p | ) |
Checks to see if a player can use a computer (not illiterate, etc.) and uses if able.
Definition at line 4642 of file game.cpp.
References _, add_msg(), map::computer_at(), debugmsg, effect_contacts, Character::has_bionic(), Creature::has_effect(), map::has_flag(), Character::has_trait(), Character::is_blind(), m, m_bad, m_info, tripoint::to_string(), u, computer_session::use(), and Character::worn_with_flag().
Referenced by examine().
| void game::validate_camps | ( | ) |
validate camps to ensure they are on the overmap list
Definition at line 2064 of file game.cpp.
References _, overmapbuffer::add_camp(), basecamp::camp_omt_pos(), map::hoist_submap_camp(), basecamp::is_valid(), m, overmap_buffer, Character::pos(), map::remove_submap_camp(), basecamp::set_name(), and u.
Referenced by load().
| void game::validate_linked_vehicles | ( | ) |
validate towed vehicles so they get linked up again after a load
Definition at line 2006 of file game.cpp.
References map::get_vehicles(), m, towing_data::other_towing_point, towing_data::set_towing(), vehicle::tow_data, tripoint_zero, map::veh_at(), and veh_pointer_or_null().
Referenced by load().
| void game::validate_mounted_npcs | ( | ) |
Definition at line 2021 of file game.cpp.
References Creature::add_effect(), all_monsters(), character_id, effect_ridden, effect_riding, g, m, Character::mounted_creature, num_bp, Character::setpos(), and shared_from().
Referenced by load(), and vertical_shift().
| void game::validate_npc_followers | ( | ) |
validate list of followers to account for overmap buffers
Definition at line 2040 of file game.cpp.
References add_npc_follower(), player::follower_ids, get_npcs_if(), overmapbuffer::get_npcs_near_player(), Character::getID(), npc::is_player_ally(), overmap_buffer, u, and update_faction_api().
Referenced by load().
| void game::vertical_move | ( | int | z, |
| bool | force, | ||
| bool | peeking = false |
||
| ) |
Moves the player vertically.
If force == true then they are falling. If peeking == true, forbids some exotic movement options
Strength increases breath-holding capacity while diving Dexterity increases chance of moving past monsters on stairs Dodge increases chance of moving past monsters on stairs Strength increases chance of moving past monsters on stairs Melee increases chance of moving past monsters on stairsDefinition at line 10109 of file game.cpp.
References _, active_npc, add_msg(), all_monsters(), cata_event_dispatch::avatar_moves(), c, can_use_mutation_warn(), map_funcs::climbing_cost(), closest_points_first(), CMM_CROUCH, CMM_RUN, CMM_WALK, coming_to_stairs, map::creature_on_trap(), critter_tracker, debugmsg, Character::dex_cur, dice(), om_direction::displace(), effect_pet, effect_ridden, effect_tied, find_empty_spot_nearby(), find_or_make_stairs(), monster::friendly, map::furn_set(), g, get_levx(), get_levy(), get_levz(), Character::get_name(), monster::get_name(), Character::get_skill_level(), avatar::grab(), player::grab_point, map::has_flag(), monster::has_flag(), map::has_floor_or_support(), map::has_furn(), Character::has_trait(), map::has_zlevels(), map::invalidate_map_cache(), npc::is_enemy(), Character::is_hauling(), Character::is_mounted(), Creature::is_underwater(), itype_manhole_cover, itype_swim_fins, iuse::ladder(), map::load(), m, m_bad, m_good, m_info, m_warning, MF_RIDEABLE_MECH, Creature::mod_moves(), monstairz, Character::mounted_creature, monster::mounted_player, npc::move_away_from(), move_cost(), map::move_cost(), Character::move_effects(), Character::movement_mode_is(), Creature::moves, Character::mutation_spend_resources(), om_direction::name(), OBJECT_NONE, OVERMAP_HEIGHT, Character::oxygen, map::passable(), point_selection_menu(), map::points_in_radius(), Character::pos(), Character::posx(), Character::posy(), Character::posz(), query_yn(), reload_npcs(), remove_zombie(), rl_dist(), rng(), player::set_underwater(), Character::setpos(), monster::setpos(), shift_monsters(), Character::shoe_type_count(), skill_dodge, skill_melee, sm_to_ms_copy(), map::spawn_item(), start_hauling(), Character::stop_hauling(), Character::str_cur, Character::swim_speed(), t_manhole, t_manhole_cover, t_rope_up, map::ter(), map::ter_set(), map::tername(), TFLAG_DEEP_WATER, trait_WEB_ROPE, tripoint_zero, u, map::unboard_vehicle(), update_map(), update_stair_monsters(), monster::use_mech_power(), vertical_move(), vertical_shift(), Character::worn_with_flag(), tripoint::x, tripoint::xy(), and tripoint::y.
Referenced by handle_action(), peek(), and vertical_move().
| void game::vertical_notes | ( | int | z_before, |
| int | z_after | ||
| ) |
Add goes up/down auto_notes (if turned on)
Definition at line 10742 of file game.cpp.
References _, overmapbuffer::add_note(), debugmsg, Character::global_omt_location(), oter_t::has_flag(), overmapbuffer::has_note(), map::inbounds_z(), known_down, known_up, m, overmap_buffer, points_in_radius(), overmapbuffer::seen(), overmapbuffer::set_seen(), string_format(), overmapbuffer::ter(), and u.
Referenced by vertical_shift().
| void game::vertical_shift | ( | int | z_after | ) |
Actual z-level movement part of vertical_move.
Doesn't include stair finding, traps etc.
Definition at line 10705 of file game.cpp.
References map::access_cache(), map::clear_vehicle_cache(), debugmsg, get_levx(), get_levy(), get_levz(), avatar::grab(), map::has_zlevels(), map::load(), m, level_cache::map_memory_seen_cache, OBJECT_NONE, OVERMAP_DEPTH, OVERMAP_HEIGHT, reload_npcs(), scent_map::reset(), scent, map::set_outside_cache_dirty(), map::set_transparency_cache_dirty(), Character::setz(), shift_monsters(), map::spawn_monsters(), u, validate_mounted_npcs(), level_cache::vehicle_list, vertical_notes(), map::vertical_shift(), and level_cache::zone_vehicles.
Referenced by place_player(), and vertical_move().
| bool game::walk_move | ( | const tripoint & | dest, |
| bool | via_ramp = false |
||
| ) |
TODO: This should really use the mounted creatures stamina, if mounted. Monsters don't currently have stamina however. For the time being just don't burn players stamina when mounted.
Dexterity decreases chance of tentacles getting stuck to the ground Intelligence decreases chance of tentacles getting stuck to the groundDefinition at line 8899 of file game.cpp.
References _, add_msg(), AEP_MOVEMENT_NOISE, AEP_STEALTH, cata_event_dispatch::avatar_moves(), Character::burn_move_stamina(), CMM_CROUCH, CMM_RUN, CMM_WALK, map::combined_movecost(), Character::dex_cur, sfx::do_footstep(), sfx::do_obstacle(), enumerate_as_string(), fd_fire, Character::footwear_factor(), iexamine::fungus(), map::furn(), get_dangerous_tile(), map::get_field_age(), map::get_field_intensity(), avatar::get_grab_type(), Character::get_size(), monster::get_size(), Character::get_weight(), avatar::grab(), player::grab_point, grabbed_move(), Character::has_artifact_with(), Character::has_bionic(), map::has_flag(), map::has_flag_ter(), map::has_flag_ter_or_furn(), map::has_furn(), Character::has_trait(), int_id< T >::id(), map::impassable(), Character::int_cur, is_dangerous_tile(), Character::is_hauling(), Character::is_mounted(), Character::is_on_ground(), player::is_stealthy(), Character::is_wearing(), itype_rm13_armor_on, player::last_target_pos, m, m_bad, m_good, m_warning, MAX_RECOIL, MF_LOUDMOVES, MF_RIDEABLE_MECH, Character::mod_fatigue(), Character::mounted_creature, map::move_cost(), map_data_common_t::movecost, sounds::movement, Character::movement_mode_is(), Creature::moves, MS_HUGE, MS_LARGE, MS_MEDIUM, MS_SMALL, MS_TINY, Character::mutation_value(), map::name(), cata::nullopt, int_id< T >::obj(), OBJECT_FURNITURE, OBJECT_NONE, OBJECT_VEHICLE, on_move_effects(), one_in(), optional_vpart_position::part_displayed(), place_player(), Character::pos(), Character::posx(), Character::posy(), Character::posz(), prompt_dangerous_tile(), Character::recoil, map::remove_field(), Character::run_cost(), map::set_field_age(), map::set_field_intensity(), player::set_underwater(), sm_to_ms_copy(), sounds::sound(), start_hauling(), string_id< T >::str(), map::ter(), TFLAG_HIDE_PLACE, TFLAG_SMALL_PASSAGE, trait_M_IMMUNE, trait_PARKOUR, trigdist, tripoint_zero, u, map::veh_at(), veh_pointer_or_null(), vehicle::wheelcache, tripoint::x, tripoint::xy(), tripoint::y, and tripoint::z.
Referenced by swap_critters().
| void game::win | ( | ) |
Marks the game as won.
Doesn't end the game.
Definition at line 2535 of file game.cpp.
References achievements_tracker_ptr, memorial_logger::add(), Messages::display_messages(), get_kill_tracker(), player::is_dead_state(), memorial(), pgettext(), show_scores_ui(), calendar::start_of_game, stats(), calendar::turn, u, and win_screen().
|
private |
Definition at line 2549 of file game.cpp.
References _, memorial_logger::add(), c_green, c_red, colorize(), player::is_dead_state(), memorial(), pgettext(), popup(), calendar::start_of_game, string_format(), translation::to_translation(), calendar::turn, and u.
Referenced by win().
| void game::write_memorial_file | ( | const std::string & | filename, |
| std::string | sLastWords | ||
| ) |
Writes information about the character out to a text file timestamped with the time of the file was made.
This serves as a record of the character's state at the time the memorial was made (usually upon death) and accomplishments in a human-readable format.
Definition at line 2939 of file game.cpp.
References _, assure_dir_exist(), debugmsg, memorial(), PATH_INFO::memorialdir(), world_generator, memorial_logger::write(), and write_to_file().
Referenced by cleanup_at_end().
| void game::zones_manager | ( | ) |
Definition at line 6238 of file game.cpp.
References _, action, add_draw_callback(), c_green, c_light_gray, c_light_green, c_white, c_yellow, calcStartPos(), center, zone_options::create(), create_zone_callback(), direction_from(), direction_name_short(), ui::omap::display_zones(), draw_scrollbar(), uilist::entries, g, charge_removal_blacklist::get(), zone_manager::get_manager(), map::getabs(), map::getlocal(), Character::global_omt_location(), input_context::handle_input(), invalidate_main_ui_adaptor(), look_around(), m, query_popup::message(), ms_to_omt_copy(), mvwprintz(), om_direction::name(), catacurses::newwin(), cata::nullopt, query_popup::on_top(), PATH_INFO::options(), point_south, point_zero, popup(), Character::pos(), look_around_result::position, uilist::query(), query_yn(), ui_manager::redraw(), input_context::register_action(), input_context::register_cardinal(), input_context::reset_timeout(), uilist::ret, rl_dist(), second, input_context::set_timeout(), TERMX, TERMY, uilist::text, trig_dist(), trim_by_length(), tripoint_zero, u, player::view_offset, catacurses::werase(), catacurses::wnoutrefresh(), tripoint::z, zones_manager_draw_borders(), zones_manager_open, and zones_manager_shortcuts().
Referenced by handle_action().
| void game::zoom_in | ( | ) |
Definition at line 7200 of file game.cpp.
References tileset_zoom.
Referenced by handle_action(), and look_around().
| void game::zoom_out | ( | ) |
Definition at line 7188 of file game.cpp.
References tileset_zoom.
Referenced by handle_action(), and look_around().
|
friend |
|
friend |
Definition at line 360 of file game.h.
Referenced by all_creatures().
|
friend |
Definition at line 103 of file avatar.cpp.
Referenced by butcher_submenu().
|
friend |
|
friend |
Definition at line 146 of file map.cpp.
Referenced by check_art_charge_req(), delete_cyborg_item(), extended_description(), find_empty_spot_nearby(), get_fire_fuel_string(), and print_terrain_info().
|
friend |
Definition at line 387 of file character.cpp.
|
friend |
Definition at line 64 of file weather.cpp.
Referenced by do_turn(), get_player_input(), is_in_sunlight(), load(), natural_light_level(), place_player_overmap(), serialize_master(), setup(), start_game(), and unserialize_master().
|
friend |
Definition at line 359 of file game.h.
Referenced by all_monsters().
|
private |
Definition at line 981 of file game.h.
Referenced by death_screen(), game(), handle_action(), serialize(), setup(), unserialize(), and win().
|
private |
Definition at line 1063 of file game.h.
Referenced by cleanup_dead(), critter_at(), load_npcs(), game::npc_range::npc_range(), num_creatures(), setup(), shared_from(), unload_npcs(), update_map(), and vertical_move().
| bool game::auto_travel_mode = false |
Definition at line 1044 of file game.h.
Referenced by handle_action(), serialize(), and unserialize().
|
private |
Definition at line 1061 of file game.h.
Referenced by list_monsters(), look_around(), and setup().
| std::vector<monster> game::coming_to_stairs |
Definition at line 1009 of file game.h.
Referenced by replace_stair_monsters(), serialize(), setup(), unserialize(), update_stair_monsters(), and vertical_move().
|
private |
Has anything died in this turn and needs to be cleaned up?
Definition at line 1075 of file game.h.
Referenced by cleanup_dead(), and set_critter_died().
| pimpl<Creature_tracker> game::critter_tracker |
Definition at line 999 of file game.h.
Referenced by cleanup_dead(), clear_zombies(), critter_at(), game::monster_range::monster_range(), num_creatures(), place_critter_around(), place_critter_within(), remove_zombie(), serialize(), shared_from(), shift_monsters(), spawn_hallucination(), start_game(), swap_critters(), unserialize(), update_zombie_pos(), and vertical_move().
|
private |
|
private |
Definition at line 1092 of file game.h.
Referenced by draw_ter(), handle_action(), shift_destination_preview(), try_get_left_click_action(), and try_get_right_click_action().
| int game::displaying_lighting_condition = 0 |
|
private |
Definition at line 945 of file game.h.
Referenced by display_overlay_state(), and display_toggle_overlay().
| Creature* game::displaying_visibility_creature |
Creature for which to display the visibility map.
Definition at line 1036 of file game.h.
Referenced by display_visibility().
|
private |
Definition at line 251 of file game.h.
Referenced by add_draw_callback(), and draw().
| point game::driving_view_offset |
Definition at line 1023 of file game.h.
Referenced by calc_driving_offset(), do_turn(), handle_action(), and set_driving_view_offset().
| pimpl<faction_manager> game::faction_manager_ptr |
Definition at line 1000 of file game.h.
Referenced by display_faction_epilogues(), handle_action(), perhaps_add_random_npc(), serialize_master(), setup(), and unserialize_master().
|
private |
|
private |
Definition at line 1065 of file game.h.
Referenced by add_npc_follower(), death_screen(), disp_NPC_epilogues(), get_follower_list(), remove_npc_follower(), reset_npc_dispositions(), and setup().
| bool game::fullscreen = false |
Definition at line 1042 of file game.h.
Referenced by load_static_data(), reenter_fullscreen(), temp_exit_fullscreen(), and toggle_fullscreen().
|
private |
Definition at line 1081 of file game.h.
Referenced by cleanup_at_end(), death_screen(), do_turn(), gametype(), handle_action(), has_gametype(), load(), and start_game().
|
private |
Definition at line 985 of file game.h.
Referenced by do_turn(), load_map(), on_options_changed(), and update_map().
|
private |
Definition at line 250 of file game.h.
Referenced by draw_ter(), and look_around().
|
private |
Definition at line 982 of file game.h.
Referenced by game(), get_kill_tracker(), serialize(), setup(), and unserialize().
|
private |
Definition at line 1094 of file game.h.
Referenced by mouse_edge_scrolling().
|
private |
Definition at line 1096 of file game.h.
Referenced by mouse_edge_scrolling_overmap(), and mouse_edge_scrolling_terrain().
|
private |
Definition at line 1095 of file game.h.
Referenced by mouse_edge_scrolling_overmap(), and mouse_edge_scrolling_terrain().
|
private |
Definition at line 1067 of file game.h.
Referenced by autosave(), init_autosave(), and quicksave().
|
mutableprivate |
Definition at line 1068 of file game.h.
Referenced by natural_light_level(), and reset_light_level().
|
private |
Definition at line 1058 of file game.h.
Referenced by list_items().
|
private |
Definition at line 1057 of file game.h.
Referenced by list_items().
|
private |
Definition at line 976 of file game.h.
Referenced by draw_look_around_cursor(), and handle_mouseview().
| map& game::m |
Definition at line 989 of file game.h.
Referenced by autopilot_vehicles(), cata_event_dispatch::avatar_moves(), butcher(), catch_a_monster(), chat(), check_near_zone(), check_zone(), control_vehicle(), delete_cyborg_item(), disable_robot(), disp_NPCs(), do_turn(), draw(), draw_bullet(), draw_critter(), draw_critter_highlighted(), draw_critter_internal(), draw_hit_mon(), draw_look_around_cursor(), draw_ter(), examine(), extended_description(), find_nearby_items(), find_or_make_stairs(), fling_creature(), forced_door_closing(), get_cur_om(), get_dangerous_tile(), get_fishable_locations(), get_levx(), get_levy(), get_levz(), get_player_input(), get_veh_dir_indicator_location(), grabbed_furn_move(), grabbed_veh_move(), handle_action(), is_empty(), is_game_over(), is_in_sunlight(), is_sheltered(), knockback(), list_items(), list_monsters(), load(), load_map(), load_npcs(), look_around(), mon_info_update(), monmove(), moving_vehicle_dismount(), peek(), perhaps_add_random_npc(), phasing_move(), pickup(), place_critter_around(), place_player(), place_player_overmap(), place_vehicle_nearby(), pre_print_all_tile_info(), print_all_tile_info(), print_fields_info(), print_graffiti_info(), print_items_info(), print_terrain_info(), print_trap_info(), process_artifact(), prompt_dangerous_tile(), remoteveh(), save_maps(), serialize(), setup(), shift_monsters(), start_game(), start_hauling(), swap_critters(), try_get_left_click_action(), try_get_right_click_action(), update_map(), update_stair_monsters(), use_computer(), validate_camps(), validate_linked_vehicles(), validate_mounted_npcs(), vertical_move(), vertical_notes(), vertical_shift(), walk_move(), and zones_manager().
|
private |
Definition at line 1100 of file game.h.
Referenced by create_or_get_main_ui_adaptor(), invalidate_main_ui_adaptor(), and mark_main_ui_adaptor_resize().
|
private |
Definition at line 983 of file game.h.
Referenced by game(), and memorial().
| int game::monstairz = 0 |
Definition at line 1010 of file game.h.
Referenced by update_stair_monsters(), and vertical_move().
| int game::mostseen = 0 |
Definition at line 1049 of file game.h.
Referenced by handle_action(), load(), mon_info_update(), place_player(), serialize(), start_game(), and unserialize().
|
private |
Definition at line 1066 of file game.h.
Referenced by do_turn(), get_moves_since_last_save(), init_autosave(), quickload(), and quicksave().
| bool game::new_game = false |
True if the game has just started or loaded, else false.
Definition at line 1006 of file game.h.
Referenced by do_turn(), setup(), and start_game().
|
private |
Definition at line 1064 of file game.h.
Referenced by assign_mission_id(), serialize_master(), setup(), and unserialize_master().
|
private |
Definition at line 1062 of file game.h.
Referenced by assign_npc_id(), serialize_master(), setup(), and unserialize_master().
|
private |
Has a NPC been spawned since last load?
Definition at line 1073 of file game.h.
Referenced by do_turn(), load_npcs(), and set_npcs_dirty().
| bool game::queue_screenshot = false |
|
private |
Definition at line 1071 of file game.h.
Referenced by remoteveh(), setremoteveh(), and setup().
|
private |
Definition at line 1070 of file game.h.
Referenced by remoteveh(), setremoteveh(), and setup().
| safe_mode_type game::safe_mode |
Definition at line 1046 of file game.h.
Referenced by check_safe_mode_allowed(), handle_action(), load(), mon_info_update(), serialize(), set_safe_mode(), start_game(), and unserialize().
|
private |
Definition at line 1060 of file game.h.
Referenced by check_safe_mode_allowed(), handle_action(), and set_safe_mode().
| const scenario* game::scen |
Definition at line 1008 of file game.h.
Referenced by start_calendar(), and start_game().
| scent_map& game::scent |
Definition at line 991 of file game.h.
Referenced by display_scent(), do_turn(), serialize(), setup(), unserialize(), update_map(), and vertical_shift().
|
private |
Seed for all the random numbers that should have consistent randomness (weather).
Definition at line 1089 of file game.h.
Referenced by get_seed(), serialize_master(), start_game(), and unserialize_master().
|
private |
Definition at line 1056 of file game.h.
Referenced by list_items(), and reset_item_list_state().
| bool game::show_panel_adm = false |
Definition at line 1040 of file game.h.
Referenced by draw_panels(), and load_static_data().
|
private |
Definition at line 984 of file game.h.
Referenced by game(), and spell_events_subscriber().
|
private |
Definition at line 980 of file game.h.
Referenced by game(), serialize(), stats(), and unserialize().
| tripoint game::ter_view_p |
Definition at line 1012 of file game.h.
Referenced by draw(), and draw_ter().
|
private |
How far the tileset should be zoomed out, 16 is default.
32 is zoomed in by x2, 8 is zoomed out by x0.5
Definition at line 1086 of file game.h.
Referenced by get_zoom(), look_around(), mouse_edge_scrolling_terrain(), reset_zoom(), set_zoom(), zoom_in(), and zoom_out().
|
private |
| timed_event_manager& game::timed_events |
Definition at line 992 of file game.h.
Referenced by do_turn(), natural_light_level(), and setup().
| pimpl<drop_token_provider> game::token_provider_ptr |
Definition at line 1001 of file game.h.
Referenced by serialize(), setup(), and unserialize().
| int game::turnssincelastmon = 0 |
Definition at line 1047 of file game.h.
Referenced by handle_action(), mon_info_update(), and setup().
| avatar& game::u |
Definition at line 990 of file game.h.
Referenced by add_npc_follower(), autopilot_vehicles(), cata_event_dispatch::avatar_moves(), butcher(), calc_driving_offset(), cancel_activity_or_ignore_query(), cancel_activity_query(), catch_a_monster(), centerlistview(), chat(), check_safe_mode_allowed(), cleanup_at_end(), control_vehicle(), create_starting_npcs(), critter_at(), critter_by_id(), death_screen(), disable_robot(), disp_NPCs(), display_scent(), do_turn(), draw(), draw_critter(), draw_critter_highlighted(), draw_critter_internal(), draw_hit_mon(), draw_line(), draw_look_around_cursor(), draw_minimap(), draw_panels(), draw_ter(), draw_trail_to_square(), draw_veh_dir_indicator(), drop(), drop_in_direction(), exam_vehicle(), examine(), extended_description(), find_nearby_items(), find_or_make_stairs(), fling_creature(), forced_door_closing(), fungal_effects::fungalize(), get_dangerous_tile(), get_player_base_save_path(), get_player_input(), get_veh_dir_indicator_location(), grabbed_furn_move(), grabbed_move(), grabbed_veh_move(), handle_action(), handle_key_blocking_activity(), inv_map_splice(), is_game_over(), is_hostile_within(), is_in_viewport(), item_action_menu(), knockback(), list_items(), list_items_monsters(), list_missions(), list_monsters(), load(), look_around(), mon_info(), mon_info_update(), monmove(), move_save_to_graveyard(), moving_vehicle_dismount(), npc_menu(), on_move_effects(), open_consume_item_menu(), overmap_npc_move(), peek(), perhaps_add_random_npc(), phasing_move(), pickup_feet(), place_player(), place_player_overmap(), print_all_tile_info(), print_creature_info(), print_items_info(), print_terrain_info(), print_trap_info(), process_activity(), process_artifact(), process_voluntary_act_interrupt(), prompt_dangerous_tile(), quickload(), remoteveh(), remove_npc_follower(), save(), save_player_data(), serialize(), set_driving_view_offset(), setremoteveh(), shared_from(), slip_down(), fungal_effects::spread_fungus_one_tile(), start_game(), start_hauling(), toggle_gate(), try_get_left_click_action(), try_get_right_click_action(), unserialize(), update_map(), update_overmap_seen(), update_stair_monsters(), use_computer(), validate_camps(), validate_npc_followers(), vertical_move(), vertical_notes(), vertical_shift(), walk_move(), win(), win_screen(), and zones_manager().
|
private |
Definition at line 1051 of file game.h.
Referenced by shared_from().
| quit_status game::uquit |
Used in main.cpp to determine what type of quit is being performed.
Definition at line 1004 of file game.h.
Referenced by cleanup_at_end(), do_turn(), get_player_input(), handle_action(), is_game_over(), and setup().
|
private |
Definition at line 1083 of file game.h.
Referenced by get_user_action_counter(), and handle_action().
| catacurses::window game::w_minimap |
Definition at line 1016 of file game.h.
Referenced by create_or_get_main_ui_adaptor(), and draw_minimap().
|
private |
Definition at line 1054 of file game.h.
Referenced by create_or_get_main_ui_adaptor().
| catacurses::window game::w_omlegend |
| catacurses::window game::w_overmap |
| catacurses::window game::w_pixel_minimap |
Definition at line 1017 of file game.h.
Referenced by create_or_get_main_ui_adaptor(), draw_pixel_minimap(), look_around(), and toggle_pixel_minimap().
| catacurses::window game::w_terrain |
Definition at line 1013 of file game.h.
Referenced by calc_driving_offset(), create_or_get_main_ui_adaptor(), display_scent(), draw(), draw_critter(), draw_critter_highlighted(), draw_cursor(), draw_look_around_cursor(), draw_ter(), draw_veh_dir_indicator(), draw_weather(), draw_zones(), handle_action(), handle_mouseview(), is_in_viewport(), look_around(), and pickup().
|
private |
Definition at line 1053 of file game.h.
Referenced by create_or_get_main_ui_adaptor().
|
private |
| bool game::was_fullscreen = false |
Definition at line 1043 of file game.h.
Referenced by load_static_data(), reenter_fullscreen(), and temp_exit_fullscreen().
|
private |
|
private |
Is Zone manager open or not - changes graphics of some zone tiles.
Definition at line 1079 of file game.h.
Referenced by is_zones_manager_open(), and zones_manager().